Re: escape sequences in test output -- colors (new snapshot)
From:
Jim Meyering
Subject:
Re: escape sequences in test output -- colors (new snapshot)
Date:
Mon, 29 Oct 2007 09:25:41 +0100
address@hidden (Bob Proulx) wrote:
> Jim Meyering wrote:
>> Or just determine why the test for whether to enable colors
>> isn't working for the buildbot? In build-aux/check.mk, it does this:
>>
>> if test -t 1; then
>> red=...
>
> The 'test -t 1' does not check the value of TERM. It simply assumes a
> vt220 terminal and assigns escape sequences without regard to terminal
> type. It really should only do this when there is a compatible $TERM
> present.
>
> The buildbot is effectively a 'script' session. The output is a tty.
> All of the output is saved to a file. But TERM is not set. It is a
> dumb terminal.
So testing TERM would do it. Thanks.
I'll do that.