Skip to content

Commit 6a309af

Browse files
committed
Don't panic if cargo rustc fails
1 parent 132d9d3 commit 6a309af

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/lib.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,11 @@ pub fn main() {
122122
if let Some("clippy") = std::env::args().nth(1).as_ref().map(AsRef::as_ref) {
123123
let args = wrap_args(std::env::args().skip(2), dep_path, sys_root);
124124
let path = std::env::current_exe().expect("current executable path invalid");
125-
let run = std::process::Command::new("cargo")
125+
std::process::Command::new("cargo")
126126
.args(&args)
127127
.env("RUSTC", path)
128128
.spawn().expect("could not run cargo")
129-
.wait().expect("failed to wait for cargo?")
130-
.success();
131-
assert!(run, "cargo rustc failed");
129+
.wait().expect("failed to wait for cargo?");
132130
} else {
133131
let args: Vec<String> = if env::args().any(|s| s == "--sysroot") {
134132
env::args().collect()

0 commit comments

Comments
 (0)