Browse Source

meli: add invalid flag combo check

tags/alpha-0.5.1
Manos Pitsidianakis 3 months ago
parent
commit
fead7a5da4
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS. GPG Key ID: 73627C2F690DF710
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      src/bin.rs

+ 12
- 0
src/bin.rs View File

@@ -301,6 +301,18 @@ fn run_app() -> Result<()> {
Some(PrintManPage) => {}
};

if (args.print_manpage.is_some()
^ args.test_config.is_some()
^ args.create_config.is_some()
^ args.config.is_some())
&& !(args.print_manpage.is_some()
|| args.test_config.is_some()
|| args.create_config.is_some()
|| args.config.is_some())
{
error_and_exit!("error: illegal command-line flag combination");
}

if let Some(config_path) = args.test_config.as_ref() {
conf::FileSettings::validate(config_path)?;
return Ok(());


Loading…
Cancel
Save