fix: fixes an issue where invalid short args didn't cause an error

Closes #368
This commit is contained in:
Kevin K 2016-01-03 22:51:31 -05:00
parent 8f3817f665
commit c9bf7e4440

View file

@ -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)