pub trait ExitStatusExt {
// Required methods
fn check_status(&mut self) -> Result<()>;
fn check_status_with_stderr(&mut self, stderr: File) -> Result<()>;
}Expand description
Helpers intended for std::process::ExitStatus.
Required Methods§
Sourcefn check_status(&mut self) -> Result<()>
fn check_status(&mut self) -> Result<()>
If the exit status signals it was not successful, return an error. Note that we intentionally don’t include the command string in the output; we leave it to the caller to add that if they want, as it may be verbose.
Sourcefn check_status_with_stderr(&mut self, stderr: File) -> Result<()>
fn check_status_with_stderr(&mut self, stderr: File) -> Result<()>
If the exit status signals it was not successful, return an error;
this also includes the contents of stderr.
Otherwise this is the same as Self::check_status.