Don't try to colorize a dumb terminal.
authorJim Meyering <meyering@redhat.com>
Mon, 29 Oct 2007 09:37:09 +0000 (10:37 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 29 Oct 2007 09:37:09 +0000 (10:37 +0100)
* build-aux/check.mk (am__tty_colors): Skip colors if $TERM is "dumb".
Thanks to Bob Proulx.

ChangeLog
build-aux/check.mk

index 4399213..d9a05e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-10-29  Jim Meyering  <meyering@redhat.com>
 
+       Don't try to colorize a dumb terminal.
+       * build-aux/check.mk (am__tty_colors): Skip colors if $TERM is "dumb".
+       Thanks to Bob Proulx.
+
        Remove gnulib's printf-posix module, for now.
        * bootstrap.conf (gnulib_modules): It caused too many test failures.
 
index 8e43147..862b3e5 100644 (file)
@@ -60,7 +60,7 @@ END {                                                         \
 # this fails; a conservative approach.  Of course do not redirect
 # stdout here, just stderr...
 am__tty_colors =                               \
-if test -t 1 2>/dev/null && test -n "$$TERM"; then     \
+if test -t 1 2>/dev/null && test -n "$$TERM" && test "$$TERM" != dumb; then \
   red='\e[0;31m';                               \
   grn='\e[0;32m';                               \
   lgn='\e[1;32m';                               \