There is currently no better solution, alas. However, the correct solution would be a method Command::into_io(self) -> (Option<StdIo>, Option<StdIo>, Option<StdIo>)that deconstructs Commandto return stdin, stdout, and stderr, if available.
I added issue to add this feature.
source
share