]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
If $TERM is empty, don't use colors. This helps the buildbot,
authorJim Meyering <meyering@redhat.com>
Mon, 29 Oct 2007 08:47:52 +0000 (09:47 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 29 Oct 2007 08:47:52 +0000 (09:47 +0100)
since it produces its result in an environment with a tty, but
we don't want color codes in that case.
* build-aux/check.mk (am__tty_colors): Test for nonempty $TERM.

ChangeLog
build-aux/check.mk

index c0a2d8d0b47c5d2a8155c22b909799619ed928b9..ae8121a7f6fe780e32e3c6c63cc327a1806a24c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-10-29  Jim Meyering  <meyering@redhat.com>
 
+       If $TERM is empty, don't use colors.  This helps the buildbot,
+       since it produces its result in an environment with a tty, but
+       we don't want color codes in that case.
+       * build-aux/check.mk (am__tty_colors): Test for nonempty $TERM.
+
        Always initialize terminal colorization string variables.
        * build-aux/check.mk (am__tty_colors): Always initialize red, grn, etc.,
        In case they're defined in the environment.
index c4dfd35e173efdc54ebcf62c2a8a4ef3faa4bf8b..8f0d1c0973cc208477b95497b2edeb3930c3298e 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; then                 \
+if test -t 1 2>/dev/null && test -n "$$TERM"; then     \
   red='\e[0;31m';                               \
   grn='\e[0;32m';                               \
   lgn='\e[1;32m';                               \