Function cmd_utils::command_to_file
source · [−]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)whenspawnorwaitfailCmdSpawnError::Child(ChildError)when the child process exit with a failed status