We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08c425e commit c949de5Copy full SHA for c949de5
1 file changed
src/run/runner/helpers/setup.rs
@@ -20,11 +20,17 @@ pub fn run_with_sudo(command_args: &[&str]) -> Result<()> {
20
.args(&command_args[1..])
21
.stdout(Stdio::piped())
22
.output()
23
- .map_err(|_| anyhow!("Failed to execute command: {}", command_args.join(" ")))?;
+ .map_err(|error| {
24
+ anyhow!(
25
+ "Failed to execute command: {} ({error:?})",
26
+ command_args.join(" ")
27
+ )
28
+ })?;
29
30
if !output.status.success() {
31
info!("stdout: {}", String::from_utf8_lossy(&output.stdout));
32
error!("stderr: {}", String::from_utf8_lossy(&output.stderr));
33
+ eprintln!("Command failed with status: {}", output.status);
34
bail!("Failed to execute command: {}", command_args.join(" "));
35
}
36
0 commit comments