[pbuilder] 01/01: modules: properly deal with tput not detecting a colored-capable terminal (as within cron)
Mattia Rizzolo
mattia at debian.org
Sat Sep 10 07:42:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository pbuilder.
commit d9b4bdc517624f3ee292cf7218a04ea63da16875
Author: Mattia Rizzolo <mattia at debian.org>
Date: Sat Sep 10 07:41:35 2016 +0000
modules: properly deal with tput not detecting a colored-capable terminal (as within cron)
Closes: #837202
---
pbuilder-modules | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pbuilder-modules b/pbuilder-modules
index fd78c03..14bcf54 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -174,7 +174,8 @@ _contains() {
term_supports_colors() {
if [ -z ${USECOLORS:-} ] || [ "$USECOLORS" = "auto" ]; then
- [ $(tput colors) -ge 8 ] && USECOLORS=yes || USECOLORS=no
+ local tputout="$(tput colors 2> /dev/null)"
+ [ ${tputout:-0} -ge 8 ] && USECOLORS=yes || USECOLORS=no
fi
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git
More information about the Pbuilder-maint
mailing list