Skip to content

Commit

Permalink
refactor: Build help subcommand separately
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 17, 2022
1 parent 729f4e7 commit 807ddbb
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/build/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2902,13 +2902,12 @@ impl<'help> App<'help> {
&& !self.subcommands.iter().any(|s| s.id == Id::help_hash())
{
debug!("App::_check_help_and_version: Building help subcommand");
self.subcommands.push(
App::new("help")
.about("Print this message or the help of the given subcommand(s)")
// The parser acts like this is set, so let's set it so we don't falsely
// advertise it to the user
.setting(AppSettings::DisableHelpFlag),
);
let help_subcmd = App::new("help")
.about("Print this message or the help of the given subcommand(s)")
// The parser acts like this is set, so let's set it so we don't falsely
// advertise it to the user
.setting(AppSettings::DisableHelpFlag);
self.subcommands.push(help_subcmd);
}
}

Expand Down

0 comments on commit 807ddbb

Please sign in to comment.