I am trying to execute a sequence of commands in the same process. E.g.
let v = vec!["python3 -m venv venv", "source venv/bin/activate"];
I have tried joining the vector with " && " and using the .args
method to no avail. I.e.
std::process::Command::new("python3")
.args(&["-m", "venv", "venv", "&&", "source", "venv/bin/activate"])
.output()
.expect("failed to execute command");
What is the best way to do this?
Note: I want to do this all in the same process to use the Python virtual env that is activated.