diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 13db57e8920..6ea06d9f88f 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1128,8 +1128,11 @@ impl<'help, 'cmd> Parser<'help, 'cmd> { source ); - // `default_missing_values` does not count (ie to avoid problems with flags) - self.verify_num_args(arg, &raw_vals)?; + // Process before `default_missing_values` to avoid it counting as values from the command + // line + if source == ValueSource::CommandLine { + self.verify_num_args(arg, &raw_vals)?; + } if raw_vals.is_empty() { // We assume this case is valid: require equals, but min_vals == 0.