activate nocollor when reportfile is set

This commit is contained in:
Jean-Marie RENOUARD 2015-06-17 17:46:52 +02:00
parent 0736ef7c56
commit 512cb3de1d

View file

@ -141,6 +141,7 @@ $reportfile=abs_path($opt{reportfile}) unless $opt{reportfile} eq "0";
my $fh=undef; my $fh=undef;
open($fh, '>', $reportfile) or die("Fail opening $reportfile") if defined($reportfile); open($fh, '>', $reportfile) or die("Fail opening $reportfile") if defined($reportfile);
$opt{nocolor} = 0 if if defined($reportfile);
# Setting up the colors for the print styles # Setting up the colors for the print styles
my $good = ($opt{nocolor} == 0)? "[\e[0;32mOK\e[0m]" : "[OK]" ; my $good = ($opt{nocolor} == 0)? "[\e[0;32mOK\e[0m]" : "[OK]" ;