pub fn run_silent(cmd: &mut Command) {
let status = match cmd.status() {
Ok(status) => status,
- Err(e) => fail(&format!("failed to execute command: {}", e)),
+ Err(e) => fail(&format!("failed to execute command: {:?}\nerror: {}",
+ cmd, e)),
};
if !status.success() {
fail(&format!("command did not execute successfully: {:?}\n\
- expected success, got: {}", cmd, status));
+ expected success, got: {}",
+ cmd,
+ status));
}
}
None
} else if target.contains("musl") {
Some(PathBuf::from("ar"))
+ } else if target.contains("openbsd") {
+ Some(PathBuf::from("ar"))
} else {
let parent = cc.parent().unwrap();
let file = cc.file_name().unwrap().to_str().unwrap();
pub fn output(cmd: &mut Command) -> String {
let output = match cmd.stderr(Stdio::inherit()).output() {
Ok(status) => status,
- Err(e) => fail(&format!("failed to execute command: {}", e)),
+ Err(e) => fail(&format!("failed to execute command: {:?}\nerror: {}",
+ cmd, e)),
};
if !output.status.success() {
panic!("command did not execute successfully: {:?}\n\
- expected success, got: {}", cmd, output.status);
+ expected success, got: {}",
+ cmd,
+ output.status);
}
String::from_utf8(output.stdout).unwrap()
}