@cryptotaxi247 / netdata-1 / commits / 0197e6209

fix(kickstart.sh): handle the case when `tput colors` doesn't return a number (#12979)

Ilya Mashchenko committed May 23, 2022 at 14:52 UTC 0197e62098c89e88eab6d1d30ced2a0cdca4dfce
1 file changed +1 -1
packaging/installer/kickstart.sh
+1 -1
@@ -339,7 +339,7 @@ setup_terminal() {
339 test -t 2 || return 1
340
341 if command -v tput > /dev/null 2>&1; then
342 - if [ $(($(tput colors 2> /dev/null))) -ge 8 ]; then
342 + if num_colors=$(tput colors 2> /dev/null) && [ "${num_colors:-0}" -ge 8 ]; then
343 # Enable colors
344 TPUT_RESET="$(tput sgr 0)"
345 TPUT_WHITE="$(tput setaf 7)"