From 512cb3de1d2578b35cf3285b667203371f7ab954 Mon Sep 17 00:00:00 2001 From: Jean-Marie RENOUARD Date: Wed, 17 Jun 2015 17:46:52 +0200 Subject: [PATCH] activate nocollor when reportfile is set --- mysqltuner.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/mysqltuner.pl b/mysqltuner.pl index 1a87e6a..c315c11 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -141,6 +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); # Setting up the colors for the print styles my $good = ($opt{nocolor} == 0)? "[\e[0;32mOK\e[0m]" : "[OK]" ;