I want to create a std::process::Command
and check whether an executable actually exists at that location before actually spawning the Command
later. What would be the pragmatic way to do this?
I have this code:
let c = std::process::Command::new("my_exe");
// something here
c.spawn().unwrap();
I want to be able to validate the my_exe
path when creating the Command
and then spawn
way later.