Skip to content

Commit bb2c1f7

Browse files
Elly Jonesbrson
authored andcommitted
cargo: complain if rustc fails
1 parent f8d06a2 commit bb2c1f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cargo/cargo.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,11 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
308308
}
309309
log #fmt["Installing: %s", name];
310310
let old = fs::list_dir(".");
311-
run::run_program("rustc", [name + ".rc"]);
311+
let p = run::program_output("rustc", [name + ".rc"]);
312+
if p.status != 0 {
313+
error(#fmt["rustc failed: %d %s", p.status, p.err]);
314+
ret;
315+
}
312316
let new = fs::list_dir(".");
313317
let created =
314318
vec::filter::<str>(new, { |n| !vec::member::<str>(n, old) });

0 commit comments

Comments
 (0)