Skip to content

Commit 0853bcb

Browse files
arlosiTurbo87
authored andcommitted
index/run_command: Add stdout to error message
1 parent 033ecd3 commit 0853bcb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cargo-registry-index/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,12 @@ impl Repository {
524524
let output = command.output()?;
525525
if !output.status.success() {
526526
let stderr = String::from_utf8_lossy(&output.stderr);
527-
return Err(anyhow!("Running git command failed with: {}", stderr));
527+
let stdout = String::from_utf8_lossy(&output.stdout);
528+
return Err(anyhow!(
529+
"Running git command failed with: {}{}",
530+
stderr,
531+
stdout
532+
));
528533
}
529534

530535
Ok(())

0 commit comments

Comments
 (0)