Skip to content

Commit e11afa2

Browse files
authored
Merge pull request #4401 from epage/last
fix(complete): Support last(true) with CommandWithArguments
2 parents e50a11a + 1ead5ef commit e11afa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/builder/debug_asserts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ pub(crate) fn assert_app(cmd: &Command) {
271271
);
272272

273273
assert!(
274-
arg.is_trailing_var_arg_set(),
275-
"Command {}: Positional argument '{}' has hint CommandWithArguments, so Command must have TrailingVarArg set.",
274+
arg.is_trailing_var_arg_set() || arg.is_last_set(),
275+
"Command {}: Positional argument '{}' has hint CommandWithArguments, so Command must have `trailing_var_arg(true)` or `last(true)` set.",
276276
cmd.get_name(),
277277
arg.get_id()
278278
);

0 commit comments

Comments
 (0)