Skip to content

Commit

Permalink
Merge pull request #4401 from epage/last
Browse files Browse the repository at this point in the history
fix(complete): Support last(true) with CommandWithArguments
  • Loading branch information
epage committed Oct 18, 2022
2 parents e50a11a + 1ead5ef commit e11afa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builder/debug_asserts.rs
Expand Up @@ -271,8 +271,8 @@ pub(crate) fn assert_app(cmd: &Command) {
);

assert!(
arg.is_trailing_var_arg_set(),
"Command {}: Positional argument '{}' has hint CommandWithArguments, so Command must have TrailingVarArg set.",
arg.is_trailing_var_arg_set() || arg.is_last_set(),
"Command {}: Positional argument '{}' has hint CommandWithArguments, so Command must have `trailing_var_arg(true)` or `last(true)` set.",
cmd.get_name(),
arg.get_id()
);
Expand Down

0 comments on commit e11afa2

Please sign in to comment.