Skip to content

Commit

Permalink
wip: fixed nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinatorul committed Aug 24, 2015
1 parent 0efcbb6 commit e6d0e04
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2391,19 +2391,17 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
self.print_help();
self.exit(1);
}
if (!self.subcmds_neg_reqs) || matches.subcommand_name().is_none() {
if self.validate_required(&matches) {
self.report_error(format!("The following required arguments were not \
supplied:{}",
self.get_required_from(self.required.iter()
.map(|s| *s)
.collect::<Vec<_>>())
.iter()
.fold(String::new(), |acc, s| acc + &format!("\n\t'{}'",
Format::Error(s))[..])),
true,
Some(matches.args.keys().map(|k| *k).collect()));
}
if ((!self.subcmds_neg_reqs) || matches.subcommand_name().is_none()) && self.validate_required(&matches) {
self.report_error(format!("The following required arguments were not \
supplied:{}",
self.get_required_from(self.required.iter()
.map(|s| *s)
.collect::<Vec<_>>())
.iter()
.fold(String::new(), |acc, s| acc + &format!("\n\t'{}'",
Format::Error(s))[..])),
true,
Some(matches.args.keys().map(|k| *k).collect()));
}
if matches.args.is_empty() && matches.subcommand_name().is_none() && self.help_on_no_args {
self.print_help();
Expand Down

0 comments on commit e6d0e04

Please sign in to comment.