Skip to content

Commit

Permalink
fix: fixes an issue where invalid short args didn't cause an error
Browse files Browse the repository at this point in the history
Closes #368
  • Loading branch information
kbknapp committed Jan 4, 2016
1 parent 8f3817f commit c9bf7e4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c9bf7e4

Please sign in to comment.