]> git.donarmstrong.com Git - mothur.git/blobdiff - readdistcommand.cpp
added [ERROR] flag if command aborts
[mothur.git] / readdistcommand.cpp
index c600eb86c969303f608b6a440dedb77af3e50b1d..630f6493fef9b542dfd8fea434f935987b6ac98f 100644 (file)
@@ -51,10 +51,10 @@ vector<string> ReadDistCommand::getRequiredFiles(){
 ReadDistCommand::ReadDistCommand(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
@@ -239,7 +239,7 @@ ReadDistCommand::~ReadDistCommand(){
 int ReadDistCommand::execute(){
        try {
                
-               if (abort == true) {    return 0;       }
+               if (abort == true) { if (calledHelp) { return 0; }  return 2;   }
 
                time_t start = time(NULL);
                size_t numDists = 0;