Skip to content

Commit

Permalink
fix(complete): Support last(true) with CommandWithArguments
Browse files Browse the repository at this point in the history
Fixes #4400
  • Loading branch information
epage committed Oct 18, 2022
1 parent cbb05d5 commit 1ead5ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builder/debug_asserts.rs
Original file line number Diff line number Diff line change
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 1ead5ef

Please sign in to comment.