]> git.donarmstrong.com Git - mothur.git/blobdiff - getgroupcommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / getgroupcommand.cpp
index 2847db149ac5e40defdbfdedfd9d99ae3df5d583..ab3ccfa36f3f2d4e6a7e1f5af6a38434640f3105 100644 (file)
@@ -24,8 +24,7 @@ vector<string> GetgroupCommand::getValidParameters(){
 //**********************************************************************************************************************
 GetgroupCommand::GetgroupCommand(){    
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["bootgroup"] = tempOutNames;
        }
@@ -61,10 +60,10 @@ vector<string> GetgroupCommand::getRequiredFiles(){
 GetgroupCommand::GetgroupCommand(string option)  {
        try {
                globaldata = GlobalData::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 {
                        //valid paramters for this command
@@ -135,7 +134,7 @@ GetgroupCommand::~GetgroupCommand(){
 int GetgroupCommand::execute(){
        try {
        
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
        
                int num, inputData, count;
                count = 0;