(&mut self, stderr: std::fs::File)
| 123 | anyhow::bail!(format!("Subprocess failed: {self:?}")) |
| 124 | } |
| 125 | fn check_status_with_stderr(&mut self, stderr: std::fs::File) -> Result<()> { |
| 126 | let stderr_buf = last_utf8_content_from_file(stderr); |
| 127 | if self.success() { |
| 128 | return Ok(()); |
| 129 | } |
| 130 | anyhow::bail!(format!("Subprocess failed: {self:?}\n{stderr_buf}")) |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | impl CommandRunExt for Command { |