Skip to content

Commit

Permalink
Merge pull request #407 from AntelopeIO/GH-318-cli-print-help-by-defa…
Browse files Browse the repository at this point in the history
…ult-main

[3.2 -> main] Changed default error handler to print help in cli apps by default
  • Loading branch information
heifner authored Oct 29, 2022
2 parents f03ac3c + 51fe9c6 commit fd4a704
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions programs/cleos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2760,6 +2760,7 @@ int main( int argc, char** argv ) {

CLI::App app{"Command Line Interface to EOSIO Client"};
app.set_help_all_flag("--help-all", "Show all help");
app.failure_message(CLI::FailureMessage::help);
app.require_subcommand();
// Hide obsolete options by putting them into a group with an empty name.
app.add_option( "-H,--host", obsoleted_option_host_port, localized("The host where ${n} is running", ("n", node_executable_name)) )->group("");
Expand Down
1 change: 1 addition & 0 deletions programs/leap-util/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ int main(int argc, char** argv) {
app.formatter(fmt);

app.set_help_all_flag("--help-all", "Show all help");
app.failure_message(CLI::FailureMessage::help);
app.require_subcommand(1, 2);

// generics sc tree
Expand Down

0 comments on commit fd4a704

Please sign in to comment.