Skip to content

Commit fa15446

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

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/install.sh

Lines changed: 3 additions & 2 deletions
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)
@@ -195,7 +196,7 @@ mk_print_next_steps_str() {
195196
echo ""
196197
fi
197198

198-
case "${SHELL}" in
199+
case "${SHELL:-}" in
199200
*/bash*)
200201
if [ "$os" = linux ]; then
201202
print_append_to_shell_profile "${HOME}/.bashrc"

0 commit comments

Comments
 (0)