mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
fix: transpiler test
This commit is contained in:
parent
46c7982335
commit
418f31e6ed
2 changed files with 9 additions and 5 deletions
|
@ -886,6 +886,7 @@ pub fn exec_py_code(code: &str, args: &[&str], output: Output) -> std::io::Resul
|
|||
.or_else(fallback)
|
||||
.expect("cannot execute python")
|
||||
} else {
|
||||
let code = code.replace('"', "\\\"").replace('`', "\\`");
|
||||
let exec_command = format!("{} -c \"{code}\" {}", which_python(), args.join(" "));
|
||||
Command::new("sh")
|
||||
.arg("-c")
|
||||
|
@ -930,6 +931,7 @@ pub fn exec_py_code_with_output(
|
|||
.or_else(fallback)
|
||||
.expect("cannot execute python")
|
||||
} else {
|
||||
let code = code.replace('"', "\\\"").replace('`', "\\`");
|
||||
let exec_command = format!("{} -c \"{code}\" {}", which_python(), args.join(" "));
|
||||
Command::new("sh")
|
||||
.arg("-c")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue