Skip to content

Commit

Permalink
Do no colorify test output if stdout is not a terminal
Browse files Browse the repository at this point in the history
like when the output is redirected into a file in a cron job.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Alex Riesen authored and Junio C Hamano committed Nov 1, 2007
1 parent 4340a81 commit f31dfa6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ esac
# . ./test-lib.sh

[ "x$TERM" != "xdumb" ] &&
[ -t 1 ] &&
tput bold >/dev/null 2>&1 &&
tput setaf 1 >/dev/null 2>&1 &&
tput sgr0 >/dev/null 2>&1 &&
Expand Down

0 comments on commit f31dfa6

Please sign in to comment.