Skip to content

Commit

Permalink
Return EXIT(1) for invalid runtime flags (#7721)
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel committed Jul 26, 2021
1 parent c6e75ce commit 773d98e
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -833,12 +833,12 @@ int initRuntimeAndSimulation(int argc, char**argv, DATA *data, threadData_t *thr
}

messageClose(LOG_STDOUT);
EXIT(0);
EXIT(1);
}

if(omc_flag[FLAG_HELP]) {
if(omc_flag[FLAG_HELP])
{
std::string option = omc_flagValue[FLAG_HELP];

for(i=1; i<FLAG_MAX; ++i)
{
if(option == std::string(FLAG_NAME[i]))
Expand Down Expand Up @@ -923,7 +923,7 @@ int initRuntimeAndSimulation(int argc, char**argv, DATA *data, threadData_t *thr

warningStreamPrint(LOG_STDOUT, 0, "invalid command line option: -help=%s", option.c_str());
warningStreamPrint(LOG_STDOUT, 0, "use %s -help for a list of all command-line flags", argv[0]);
EXIT(0);
EXIT(1);
}

setGlobalVerboseLevel(argc, argv);
Expand Down

0 comments on commit 773d98e

Please sign in to comment.