Skip to content

Commit

Permalink
fix(configs): fixed no help error in no required option command #1255
Browse files Browse the repository at this point in the history
  • Loading branch information
hitenkoku committed Feb 4, 2024
1 parent a74f01f commit 86d1f20
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/detections/configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ impl StoredStatic {
None => CommonOptions {
no_color: false,
quiet: false,
help: false,
help: None,
},
};
let binding = Path::new("./rules/config").to_path_buf();
Expand Down Expand Up @@ -1521,8 +1521,8 @@ pub struct CommonOptions {
pub quiet: bool,

/// Show the help menu
#[clap(help_heading = Some("General Options"), short = 'h', long = "help", global = true, action = ArgAction::Help, display_order = 80)]
pub help: bool,
#[clap(help_heading = Some("General Options"), short = 'h', long = "help", action = ArgAction::Help, display_order = 80, required = false)]
pub help: Option<bool>,
}

#[derive(Args, Clone, Debug)]
Expand Down Expand Up @@ -1657,8 +1657,7 @@ pub struct ComputerMetricsOption {
#[clap(
author = "Yamato Security (https://github.com/Yamato-Security/hayabusa - @SecurityYamato)",
help_template = "\nHayabusa v2.13.0 - Dev Build\n{author-with-newline}\n{usage-heading}\n hayabusa.exe <COMMAND> [OPTIONS]\n hayabusa.exe help <COMMAND>\n\n{all-args}{options}",
term_width = 400,
disable_help_flag = true
term_width = 400
)]
pub struct Config {
#[command(subcommand)]
Expand Down

0 comments on commit 86d1f20

Please sign in to comment.