Skip to content

Commit

Permalink
fix(cli): Do not inject dry-run and confirmation if --help provided
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-tomic committed Mar 17, 2023
1 parent 6122c80 commit 85fc786
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rs/cli/src/ic_admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ impl Cli {
)
};

let help_in_args = cmd.args().contains(&String::from("--help"));
if help_in_args {
return exec(self, cmd, opts, false);
}

if !self.yes {
exec(&self.dry_run(), cmd.clone(), opts.clone(), true)?;
if !Confirm::new()
Expand Down

0 comments on commit 85fc786

Please sign in to comment.