]> git.donarmstrong.com Git - mothur.git/blobdiff - homovacommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / homovacommand.cpp
index 86a900a721ae1cc68484256624365e4b56dd3877..32a776544aeebaf1c5ec74d6368ee7a26ca368b1 100644 (file)
@@ -66,8 +66,7 @@ vector<string> HomovaCommand::getValidParameters(){
 //**********************************************************************************************************************
 HomovaCommand::HomovaCommand(){        
        try {
-               abort = true;
-               //initialize outputTypes
+               abort = true; calledHelp = true; 
                vector<string> tempOutNames;
                outputTypes["homova"] = tempOutNames;
        }
@@ -105,12 +104,12 @@ vector<string> HomovaCommand::getRequiredFiles(){
 HomovaCommand::HomovaCommand(string option) {
        try {
                globaldata = GlobalData::getInstance();
-               abort = false;
+               abort = false; calledHelp = false;   
                allLines = 1;
                labels.clear();
                
                //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
@@ -349,7 +348,7 @@ HomovaCommand::~HomovaCommand(){}
 int HomovaCommand::execute(){
        try {
                
-               if (abort == true) { return 0; }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
                
                //read design file
                designMap = new GroupMap(designfile);