commit: dd7522f3df09b8a92a303cc72690363979ecff3d
Author: Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Jun 5 04:08:39 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 7 11:12:53 2023 +0000
URL:
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=dd7522f3
Don't assume a monochrome terminal in the case that tput colors fails
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>
functions.sh | 2 ++
1 file changed, 2 insertions(+)
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
}