]> granicus.if.org Git - clang/commitdiff
Only use colored output when the environment variable SCAN_BUILD_COLOR is set.
authorTed Kremenek <kremenek@apple.com>
Tue, 17 Jun 2008 03:06:59 +0000 (03:06 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 17 Jun 2008 03:06:59 +0000 (03:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52379 91177308-0d34-0410-b5e6-96231b3b80d8

utils/scan-build

index d9585f6a40861cb1ee8fda1a66320627101f9a0e..e305ee50a7e14ecd8933ccbe7239d335b24dda87 100755 (executable)
@@ -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) {