Check if the environment variable TERM is defined before using it.
This fixes: <rdar://problem/6164279> scan-build gives error when invoked without TERM variable llvm-svn: 56110
This commit is contained in:
parent
c4488441da
commit
81ced5c472
|
@ -26,8 +26,9 @@ my $BuildName;
|
|||
my $BuildDate;
|
||||
my $CXX; # Leave undefined initially.
|
||||
|
||||
my $UseColor = ((($ENV{'TERM'} eq 'xterm-color') and -t STDOUT)
|
||||
and defined($ENV{'SCAN_BUILD_COLOR'}));
|
||||
my $TERM = $ENV{'TERM'};
|
||||
my $UseColor = (defined $TERM and $TERM eq 'xterm-color' and -t STDOUT
|
||||
and defined $ENV{'SCAN_BUILD_COLOR'});
|
||||
|
||||
##----------------------------------------------------------------------------##
|
||||
# Diagnostics
|
||||
|
|
Loading…
Reference in New Issue