]> git.donarmstrong.com Git - mothur.git/blobdiff - pipelinepdscommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / pipelinepdscommand.cpp
index f95b928621215ea6d770031ab712a0a33070c31b..84282dcc39105c7f4d560b88fcacdcb4ed4342d6 100644 (file)
@@ -49,10 +49,10 @@ vector<string> PipelineCommand::getRequiredFiles(){
 PipelineCommand::PipelineCommand(string option) {
        try {
                cFactory = CommandFactory::getInstance();
-               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 {
                        
@@ -235,7 +235,7 @@ PipelineCommand::~PipelineCommand(){}
 
 int PipelineCommand::execute(){
        try {
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                int start = time(NULL);