Update python_util.rs

This commit is contained in:
gmshiba 2022-08-12 12:34:35 +09:00
parent ad0aaf49b9
commit 02a6c0279b

View file

@ -94,7 +94,9 @@ pub fn exec_py(code: &str) {
.expect("cannot execute python"); .expect("cannot execute python");
} else { } else {
let python_command = format!("{} -c \"{}\"", which_python(), code); let python_command = format!("{} -c \"{}\"", which_python(), code);
Command::new(python_command) Command::new("sh")
.arg("-c")
.arg(python_command)
.spawn() .spawn()
.expect("cannot execute python"); .expect("cannot execute python");
} }