pub fn command_to_file(
command: &mut Command,
file: File,
stderr_file: Option<File>,
) -> Result<(), CmdSpawnError>
Expand description
spawn
, wait
and send the stdout of the command to a file
ยงErrors
command_to_file can result in CmdSpawnError
:
CmdSpawnError::IO(std::io::Error)
whenspawn
orwait
failCmdSpawnError::Child(ChildError)
when the child process exit with a failed status