Helpers intended for [`std::process::ExitStatus`].
| 70 | |
| 71 | /// Helpers intended for [`std::process::ExitStatus`]. |
| 72 | pub trait ExitStatusExt { |
| 73 | /// If the exit status signals it was not successful, return an error. |
| 74 | /// Note that we intentionally *don't* include the command string |
| 75 | /// in the output; we leave it to the caller to add that if they want, |
| 76 | /// as it may be verbose. |
| 77 | fn check_status(&mut self) -> Result<()>; |
| 78 | |
| 79 | /// If the exit status signals it was not successful, return an error; |
| 80 | /// this also includes the contents of `stderr`. |
| 81 | /// |
| 82 | /// Otherwise this is the same as [`Self::check_status`]. |
| 83 | fn check_status_with_stderr(&mut self, stderr: std::fs::File) -> Result<()>; |
| 84 | } |
| 85 | |
| 86 | /// Parse the last chunk (e.g. 1024 bytes) from the provided file, |
| 87 | /// ensure it's UTF-8, and return that value. This function is infallible; |
nothing calls this directly
no outgoing calls
no test coverage detected