From bf922481b78a60a75486ff5689474838c411d233 Mon Sep 17 00:00:00 2001 From: Jean-Marie RENOUARD Date: Wed, 17 Jun 2015 17:50:06 +0200 Subject: [PATCH] activate nocollor when reportfile is set --- mysqltuner.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysqltuner.pl b/mysqltuner.pl index c315c11..0430d16 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -141,7 +141,7 @@ $reportfile=abs_path($opt{reportfile}) unless $opt{reportfile} eq "0"; my $fh=undef; open($fh, '>', $reportfile) or die("Fail opening $reportfile") if defined($reportfile); -$opt{nocolor} = 0 if if defined($reportfile); +$opt{nocolor} = 1 if defined($reportfile); # Setting up the colors for the print styles my $good = ($opt{nocolor} == 0)? "[\e[0;32mOK\e[0m]" : "[OK]" ;