Skip to content

Commit

Permalink
#576 non-success arg parsing skips all post-handling
Browse files Browse the repository at this point in the history
- If any more is added, it should be skipped as parsing has been
  trivially rejected at the lower level.

  (In the future there may be more immediate post-parsing actions.)
  • Loading branch information
pnstickne authored and lifflander committed Jun 11, 2020
1 parent 33fe57f commit 41e6566
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/vt/configs/arguments/args.cc
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,11 @@ int parseArguments(CLI::App& app, int& argc, char**& argv);
addUserArgs(app);
addSchedulerArgs(app);

int result = parseArguments(app, /*out*/ argc, /*out*/ argv);
int parse_result = parseArguments(app, /*out*/ argc, /*out*/ argv);
if (parse_result) {
// non-success
return parse_result;
}

// Determine the final colorization setting.
if (vt_no_color) {
Expand All @@ -589,7 +593,7 @@ int parseArguments(CLI::App& app, int& argc, char**& argv);

parsed_ = true;

return result;
return parse_result;
}

int parseArguments(CLI::App& app, int& argc, char**& argv) {
Expand Down

0 comments on commit 41e6566

Please sign in to comment.