diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2022-05-23 14:52:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 14:52:41 +0300 |
commit | 0197e62098c89e88eab6d1d30ced2a0cdca4dfce (patch) | |
tree | 46e1792da10c66521df1a3be511a75760296623f /packaging/installer | |
parent | da43e88d05604b2c0978580f80c18f081314a585 (diff) |
fix(kickstart.sh): handle the case when `tput colors` doesn't return a number (#12979)
Diffstat (limited to 'packaging/installer')
-rwxr-xr-x | packaging/installer/kickstart.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index ea2e464e34..dc2ca82e38 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -339,7 +339,7 @@ setup_terminal() { test -t 2 || return 1 if command -v tput > /dev/null 2>&1; then - if [ $(($(tput colors 2> /dev/null))) -ge 8 ]; then + if num_colors=$(tput colors 2> /dev/null) && [ "${num_colors:-0}" -ge 8 ]; then # Enable colors TPUT_RESET="$(tput sgr 0)" TPUT_WHITE="$(tput setaf 7)" |