summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-09-04 09:39:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-09-04 09:39:42 -0700
commitce20e32f0e4b50fefc8b19b092466186a596ea59 (patch)
treefdd3ee1b6d858cb9531e23cb8863b69b1c530e87
parent9e05730f36be7a1707751ef0aeeb5d6695007667 (diff)
parent364f9440ccc3bf54ae1db3455fbb9b6a6e9e1b2c (diff)
Merge pull request #29 from preaction/ansi-disable
only use colors when attached to a terminal
-rw-r--r--runtests.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtests.pl b/runtests.pl
index 2e2b795..2d80f14 100644
--- a/runtests.pl
+++ b/runtests.pl
@@ -16,6 +16,9 @@ if (!(@PROG && defined $SPEC)) {
exit 1;
}
+# Disable ANSI colors if we're not hooked up to a terminal
+$ENV{ANSI_COLORS_DISABLED} ||= !-t *STDOUT;
+
my $passed = 0;
my $failed = 0;
my $skipped = 0;