diff options
author | Kerin Millar <kfm@plushkava.net> | 2023-06-05 05:08:39 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-06-07 12:12:53 +0100 |
commit | dd7522f3df09b8a92a303cc72690363979ecff3d (patch) | |
tree | 388aca7a1fe70d25227eb2d4c2e11edb8fcf8c53 | |
parent | test-functions: Add a test for the _is_visible() function (diff) | |
download | gentoo-functions-dd7522f3df09b8a92a303cc72690363979ecff3d.tar.gz gentoo-functions-dd7522f3df09b8a92a303cc72690363979ecff3d.tar.bz2 gentoo-functions-dd7522f3df09b8a92a303cc72690363979ecff3d.zip |
Don't assume a monochrome terminal in the case that tput colors fails
Signed-off-by: Kerin Millar <kfm@plushkava.net>
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | functions.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh index c326af4..34bb266 100644 --- a/functions.sh +++ b/functions.sh @@ -470,6 +470,8 @@ _has_monochrome_terminal() { true elif colors=$(tput colors 2>/dev/null) && is_int "${colors}"; then test "${colors}" -eq -1 + else + false fi } |