Skip to content

Commit

Permalink
cargo: complain if rustc fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Elly Jones authored and brson committed Dec 17, 2011
1 parent f8d06a2 commit bb2c1f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cargo/cargo.rs
Expand Up @@ -308,7 +308,11 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
}
log #fmt["Installing: %s", name];
let old = fs::list_dir(".");
run::run_program("rustc", [name + ".rc"]);
let p = run::program_output("rustc", [name + ".rc"]);
if p.status != 0 {
error(#fmt["rustc failed: %d %s", p.status, p.err]);
ret;
}
let new = fs::list_dir(".");
let created =
vec::filter::<str>(new, { |n| !vec::member::<str>(n, old) });
Expand Down

0 comments on commit bb2c1f7

Please sign in to comment.