Browse Source

Improve error messages slightly around running commands

add-rc-path
Alex Crichton 10 years ago
parent
commit
a3a9a2618d
  1. 13
      src/lib.rs

13
src/lib.rs

@ -100,12 +100,13 @@ pub fn compile_library(output: &str, config: &Config, files: &[&str]) {
fn run(cmd: &mut Command) { fn run(cmd: &mut Command) {
println!("running: {}", cmd); println!("running: {}", cmd);
assert!(cmd.stdout(InheritFd(1)) let status = match cmd.stdout(InheritFd(1)).stderr(InheritFd(2)).status() {
.stderr(InheritFd(2)) Ok(status) => status,
.status() Err(e) => panic!("failed to spawn process: {}", e),
.unwrap() };
.success()); if !status.success() {
panic!("nonzero exit status: {}", status);
}
} }
fn gcc() -> String { fn gcc() -> String {

Loading…
Cancel
Save