]> git.donarmstrong.com Git - mothur.git/blobdiff - setlogfilecommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / setlogfilecommand.cpp
index b99b833a5651c80d4b54b1d957810303fe65b199..f57dfafeacd9caae5711f56c17c3102e083567f0 100644 (file)
@@ -48,10 +48,10 @@ vector<string> SetLogFileCommand::getRequiredFiles(){
 
 SetLogFileCommand::SetLogFileCommand(string option)  {
        try {
-               abort = false;
+               abort = false; calledHelp = false;   
                
                //allow user to run help
-               if(option == "help") { help(); abort = true; }
+               if(option == "help") { help(); abort = true; calledHelp = true; }
                
                else {
                        //valid paramters for this command
@@ -103,7 +103,7 @@ SetLogFileCommand::~SetLogFileCommand(){}
 int SetLogFileCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                commandFactory = CommandFactory::getInstance();