Adjust the cmatrix install script to not run if running in a GitHub Codespace
Add a check to skip `cmatrix` installation if running in a GitHub Codespace. * **Check for GitHub Codespace**: Add a check for the `CODESPACES` environment variable at the beginning of the script. * **Skip Installation**: Skip the installation of `cmatrix` if the `CODESPACES` environment variable is set. * **Informative Message**: Add a message indicating that the installation is being skipped due to running in a GitHub Codespace.
This commit is contained in:
@@ -5,6 +5,10 @@
|
|||||||
# Install cmatrix.
|
# Install cmatrix.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Check if running in a GitHub Codespace
|
||||||
|
if [ -n "$CODESPACES" ]; then
|
||||||
|
echo "Skipping cmatrix installation: Running in a GitHub Codespace"
|
||||||
|
else
|
||||||
if ! command -v "cmatrix" &>/dev/null; then
|
if ! command -v "cmatrix" &>/dev/null; then
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||||
sudo apt-get install -qq cmatrix &>/dev/null
|
sudo apt-get install -qq cmatrix &>/dev/null
|
||||||
@@ -12,3 +16,4 @@ if ! command -v "cmatrix" &>/dev/null; then
|
|||||||
brew install cmatrix
|
brew install cmatrix
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user