From b73d486a79f093d8cf793bf5e90b126a775e2133 Mon Sep 17 00:00:00 2001 From: adrien-matta <a.matta@surrey.ac.uk> Date: Tue, 28 Jul 2015 11:17:47 +0100 Subject: [PATCH] * Fixing color issue with nptool-cleaner on linux - the red was kept after the run` --- NPLib/Utility/nptool-cleaner.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/NPLib/Utility/nptool-cleaner.cxx b/NPLib/Utility/nptool-cleaner.cxx index 1e8879839..dcb29965f 100644 --- a/NPLib/Utility/nptool-cleaner.cxx +++ b/NPLib/Utility/nptool-cleaner.cxx @@ -17,7 +17,7 @@ int main(int argc , char** argv){ current = "NPSimulation"; else{ - std::cout << "\r \033[1;31m ERROR: nptool-cleaner utility online clean NPLib and NPSimulation" << endl; + std::cout << "\r \033[1;31m ERROR: nptool-cleaner utility online clean NPLib and NPSimulation \033[0m" << endl; exit(1); } @@ -36,9 +36,10 @@ int main(int argc , char** argv){ while(check){ std::cout << "**** Do you want to proceed ? (y/n) " ; std::cin >> answer; - if(answer =="n" || answer =="N") + if(answer =="n" || answer =="N"){ + std::cout << "\033[0m" ; return 0; - + } else if(answer =="y" || answer =="Y"){ std::cout << "Proceed" << std::endl; check = false; @@ -47,7 +48,8 @@ int main(int argc , char** argv){ std::cout << "Reply by y (yes) or n (no)" << std::endl; } } - + std::cout << "\033[0m" ; + std::string command,command2; // Dict command = "ls ./*/*Dict* > /dev/null 2>/dev/null"; -- GitLab