Conditionally disable expansion for external command (#6014)

* Fix 5978

* Add unit test for explicit glob

* Format

* Expansion vs none-expansion

* Add unit tests

* Fix format..

* Add debug message for MacOS

* Fix UT on Mac and add tests for windows

* cleanup

* clean up windows test

* single and double qoutes tests

* format...

* Save format.

* Add log to failed windows unit tests

* try `touch` a file

* PS or CMD

* roll back some change

* format

* Remove log and test case

* Add unit test comments

* Fix

Co-authored-by: Frank <v-frankz@microsoft.com>
This commit is contained in:
Kangaxx-0
2022-07-17 14:30:33 -07:00
committed by GitHub
parent d8d88cd395
commit eeaca50dee
3 changed files with 227 additions and 10 deletions

View File

@ -305,8 +305,8 @@ pub fn parse_external_call(
error = error.or(err);
args.push(arg);
} else {
let (contents, err) = unescape_unquote_string(contents, *span);
error = error.or(err);
// Eval stage trims the quotes, so we don't have to do the same thing when parsing.
let contents = String::from_utf8_lossy(contents).to_string();
args.push(Expression {
expr: Expr::String(contents),