Only use colored output when the environment variable SCAN_BUILD_COLOR is set.

llvm-svn: 52379
This commit is contained in:
Ted Kremenek 2008-06-17 03:06:59 +00:00
parent 08e171183f
commit 3dd7724711
1 changed files with 2 additions and 1 deletions

View File

@ -26,7 +26,8 @@ my $Prog = "scan-build";
my $BuildName;
my $BuildDate;
my $UseColor = (($ENV{'TERM'} eq 'xterm-color') and -t STDOUT);
my $UseColor = ((($ENV{'TERM'} eq 'xterm-color') and -t STDOUT)
and defined($ENV{'SCAN_BUILD_COLOR'}));
sub Diag {
if ($UseColor) {