fix internal command parsing (args.is_last) (#2224)

This commit is contained in:
bailey-layzer 2020-07-19 10:49:40 -07:00 committed by GitHub
parent aad3cca793
commit 836efd237c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1381,10 +1381,11 @@ fn classify_pipeline(
if let Some(signature) =
registry.get(&format!("{} {}", lite_cmd.name.item, lite_cmd.args[0].item))
{
let (internal_command, err) =
let (mut internal_command, err) =
parse_internal_command(&lite_cmd, registry, &signature, 1);
error = error.or(err);
internal_command.args.is_last = iter.peek().is_none();
commands.push(ClassifiedCommand::Internal(internal_command));
continue;
}
@ -1392,10 +1393,11 @@ fn classify_pipeline(
// Check if it's an internal command
if let Some(signature) = registry.get(&lite_cmd.name.item) {
let (internal_command, err) =
let (mut internal_command, err) =
parse_internal_command(&lite_cmd, registry, &signature, 0);
error = error.or(err);
internal_command.args.is_last = iter.peek().is_none();
commands.push(ClassifiedCommand::Internal(internal_command));
continue;
}