Commands spawned twice and panic on fail
Closed this issue · 2 comments
A lot of Command::new
are spawned twice as .status()
and .output()
internally spawn a process and wait for it to complete. Only one should be used .output()
which also contains .status
.
They also panic after completion if an error occurred when spawning the command by using .expect()
.
Eg.
soldeer/src/dependency_downloader.rs
Lines 220 to 230 in 660b6c9
Note that .status
and .output
have different output capturing semantics, mainly that .status pipes and .output captures into fields, so this also has to be kept in mind.
Thanks for the comment, i was never happy how i was dealing with status/output, i have to work a bit around it.
Will be fixed in 0.4.0 I guess, this has all been refactored