feat: improve git error messages

This commit is contained in:
Jacobtread 2025-08-10 22:29:45 +12:00
parent 4e97968bcb
commit ff54882d61

View file

@ -1816,6 +1816,7 @@ impl GitBinary {
output.status.success(), output.status.success(),
GitBinaryCommandError { GitBinaryCommandError {
stdout: String::from_utf8_lossy(&output.stdout).to_string(), stdout: String::from_utf8_lossy(&output.stdout).to_string(),
stderr: String::from_utf8_lossy(&output.stderr).to_string(),
status: output.status, status: output.status,
} }
); );
@ -1838,9 +1839,10 @@ impl GitBinary {
} }
#[derive(Error, Debug)] #[derive(Error, Debug)]
#[error("Git command failed: {stdout}")] #[error("Git command failed: {stdout} {stderr}")]
struct GitBinaryCommandError { struct GitBinaryCommandError {
stdout: String, stdout: String,
stderr: String,
status: ExitStatus, status: ExitStatus,
} }