Skip to content

Commit 35927e8

Browse files
committed
fix: Script install.sh in dumb TERM
When $TERM is dumb the number of colours returned is -1 we end up with no values set for the colours.
1 parent 25eb8a3 commit 35927e8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scripts/install.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ check_binaries() {
2626

2727
# Check if we have colors available, it looks good
2828
check_colors(){
29+
GREEN=''
30+
RED=''
31+
YELLOW=''
32+
NOCOL=''
2933
if command -v tput > /dev/null; then
3034
COLORS="$(tput colors)"
3135
if [ -n "${COLORS}" ] && [ "${COLORS}" -ge 8 ]; then
@@ -34,11 +38,6 @@ check_colors(){
3438
YELLOW="$(tput setaf 3)"
3539
NOCOL="$(tput sgr0)"
3640
fi
37-
else
38-
GREEN=''
39-
RED=''
40-
YELLOW=''
41-
NOCOL=''
4241
fi
4342
}
4443

0 commit comments

Comments
 (0)