Allow for and other commands missing positionals near keywords (#606)

* Allow for and other commands missing positionals near keywords

* A bit more resilience
This commit is contained in:
JT
2021-12-28 07:04:48 +11:00
committed by GitHub
parent 5c94528fe2
commit 384ea111eb
2 changed files with 16 additions and 0 deletions

View File

@ -596,6 +596,17 @@ pub fn parse_internal_call(
// spans_idx, end, positional_idx
// );
if spans[..end].is_empty() {
error = error.or_else(|| {
Some(ParseError::MissingPositional(
positional.name.clone(),
spans[spans_idx],
))
});
positional_idx += 1;
continue;
}
let orig_idx = spans_idx;
let (arg, err) = parse_multispan_value(
working_set,