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.
This commit is contained in:
Jim Meyering 2007-10-29 09:47:52 +01:00
parent 973d42b90d
commit 89157ad207
2 changed files with 6 additions and 1 deletions

View File

@ -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.

View 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=''; \
grn=''; \
lgn=''; \