fix argument type (#5695)

* fix argument type

* while run external, convert list argument to str

* fix argument converting logic

* using parse_list_expression instead of parse_full_cell_path

* make parsing logic more explicit

* revert changes

* add tests
This commit is contained in:
WindSoilder
2022-06-06 18:19:06 +08:00
committed by GitHub
parent 17a5aa3052
commit 75b2d26187
3 changed files with 46 additions and 14 deletions

View File

@ -294,9 +294,13 @@ pub fn parse_external_call(
let (arg, err) = parse_dollar_expr(working_set, *span, expand_aliases_denylist);
error = error.or(err);
args.push(arg);
} else if contents.starts_with(b"(") {
let (arg, err) =
parse_full_cell_path(working_set, None, *span, expand_aliases_denylist);
} else if contents.starts_with(b"[") {
let (arg, err) = parse_list_expression(
working_set,
*span,
&SyntaxShape::Any,
expand_aliases_denylist,
);
error = error.or(err);
args.push(arg);
} else {