From: Jim Meyering Date: Mon, 29 Oct 2007 08:47:52 +0000 (+0100) Subject: If $TERM is empty, don't use colors. This helps the buildbot, X-Git-Tag: v6.9.89~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=89157ad2075374f808773317d15b854edcc85cd8;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/ChangeLog b/ChangeLog index c0a2d8d0b4..ae8121a7f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-10-29 Jim Meyering + 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. diff --git a/build-aux/check.mk b/build-aux/check.mk index c4dfd35e17..8f0d1c0973 100644 --- a/build-aux/check.mk +++ b/build-aux/check.mk @@ -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=''; \ grn=''; \ lgn=''; \