more debug info when executing a command from linkutils

parent bb52be8d
...@@ -74,6 +74,9 @@ pub fn exec_path_nocheck(executable: PathBuf) -> Output { ...@@ -74,6 +74,9 @@ pub fn exec_path_nocheck(executable: PathBuf) -> Output {
/// panics if this command does not finish normally /// panics if this command does not finish normally
fn exec_cmd(cmd: Command) -> Output { fn exec_cmd(cmd: Command) -> Output {
let output = exec_cmd_nocheck(cmd); let output = exec_cmd_nocheck(cmd);
if cfg!(debug_assertions) && !output.status.success() {
println!(output.stderr);
}
assert!(output.status.success()); assert!(output.status.success());
output output
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment