Skip to content

Use EX_USAGE for missing arguments in main() #615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "options.h"
#include "processor.h"
#include "evaluator.h"
#include <sysexits.h>

// TODO: code refactoring to remove these global variables
string command;
Expand All @@ -17,8 +18,7 @@ int main(int argc, char* argv[]){
// display version info if no argument is given
if(argc == 1) {
cerr << "fastp: an ultra-fast all-in-one FASTQ preprocessor" << endl << "version " << FASTP_VER << endl;
//cerr << "fastp --help to see the help"<<endl;
//return 0;
return EX_USAGE;
}
if (argc == 2 && strcmp(argv[1], "test")==0){
UnitTest tester;
Expand Down