Skip to content

Commit dc0c94d

Browse files
committed
[rust] Include stderr also in shell command output
1 parent 1ca5176 commit dc0c94d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/src/shell.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ pub fn run_shell_command(shell: &str, flag: &str, command: Command) -> Result<St
9696
}
9797
}
9898
let output = process.output()?;
99-
Ok(strip_trailing_newline(&String::from_utf8_lossy(&output.stdout)).to_string())
99+
let stdout = String::from_utf8_lossy(&output.stdout);
100+
let stderr = String::from_utf8_lossy(&output.stderr);
101+
Ok(strip_trailing_newline(&(stdout + " " + stderr)).to_string())
100102
}
101103

102104
pub fn strip_trailing_newline(input: &str) -> &str {

0 commit comments

Comments
 (0)