Skip to content

Commit 9019a17

Browse files
committed
minor fix for installation script in environments without color
1 parent cb3cc16 commit 9019a17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/install.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -eu
44
IFS=$(printf '\n\t')
55

6+
COLORS_SUPPORTED=false
67
if command -v tput >/dev/null 2>&1 && [ "$(tput colors 2>/dev/null || echo 0)" -ge 8 ]; then
78
COLORS_SUPPORTED=true
89
fi
@@ -68,7 +69,7 @@ EXE_PATH="$ASTRA_CLI_DIR/astra"
6869
TAR_PATH="$ASTRA_CLI_DIR/astra.tar.gz"
6970

7071
# Colors
71-
if [ "$(color colors)" -ge 256 ]; then
72+
if [ -n "$(color colors)" ] && [ "$(color colors)" -ge 256 ]; then
7273
LIGHT_GRAY=$(color setaf 245)
7374
BLUE=$(color setaf 110)
7475
PURPLE=$(color setaf 134)

0 commit comments

Comments
 (0)