mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
fix: fixes an issue where invalid short args didn't cause an error
Closes #368
This commit is contained in:
parent
8f3817f665
commit
c9bf7e4440
1 changed files with 7 additions and 0 deletions
|
@ -2400,6 +2400,13 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar> {
|
|||
// Handle conflicts, requirements, overrides, etc.
|
||||
// Must be called here due to mutablilty
|
||||
arg_post_processing!(self, flag, matcher);
|
||||
} else {
|
||||
let mut arg = String::new();
|
||||
arg.push('-');
|
||||
arg.push(c);
|
||||
return Err(error_builder::InvalidArgument(arg,
|
||||
None,
|
||||
try!(self.create_current_usage(matcher))));
|
||||
}
|
||||
}
|
||||
Ok(None)
|
||||
|
|
Loading…
Reference in a new issue