Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Command line mode doesn't return exit-code to indicate failure. #151
Comments
bsmith89
commented
Aug 21, 2015
|
I see this has been discussed before: http://mothur.org/forum/viewtopic.php?f=10&t=2699 |
|
Thanks Byron - we've been working on adding a few more command line options in the recent releases. We'll add a flag to remove the welcome screen. Also we'll have mothur rerun a 1 on successful completion and a 0 if there's an error. We appreciate the suggestions! |
bsmith89
commented
Aug 24, 2015
|
Maybe that was a typo, but just in case: the normal "success" exit code on UNIX is 0, other numbers indicate failure. |
|
I see, you want it to be 1 if there's an error - right? |
bsmith89
commented
Aug 24, 2015
|
Yep, exactly. Some people will use different exit codes to mean different On Mon, Aug 24, 2015 at 2:04 PM, Pat Schloss notifications@github.com
|
|
If you want to skip the welcome screen you can run mothur in "quiet" mode. ./mothur "#myCommand(...);" -q |
bsmith89
commented
Aug 24, 2015
|
Oh, I didn't realize that. Thanks for the tip! On Mon, Aug 24, 2015 at 2:12 PM, Sarah Westcott notifications@github.com
|
mooreryan
commented
Apr 12, 2016
|
I know this is an older issue, but I am running into the same problems as @bsmith89 |
mooreryan
referenced this issue
in mooreryan/ZetaHunter
Apr 12, 2016
Closed
Mothur errors do not kill ZH #10
|
Thanks for hitting this thread again, :). In version 1.37 we added output to the log file indicating the number of errors and warnings. The 1.38.0 branch includes the return codes you are looking for. If the log file indicates errors the return code will be set to 1, otherwise 0. |
bsmith89 commentedAug 21, 2015
I'm trying to incorporate some mothur commands into a Makefile using the
mothur "#some.command()"syntax (http://www.mothur.org/wiki/Command_line_mode).At least for all of the examples I've tried (e.g.
mothur "#not.a.command()"), the exit code is always 0. This leads to problems when the remaining steps in the pipeline execute.I realize I'm trying to use mothur in a way it was not designed, but I'm hoping it's not a difficult patch. I'd also like a command-line option to turn off the welcome screen, but that's a different issue.