From 6a309af2f3855ed16f4f914ccbe13bce7de6c59a Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Mon, 16 May 2016 23:12:55 +0530 Subject: [PATCH] Don't panic if cargo rustc fails --- src/lib.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 695491e9523..d3940575659 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -122,13 +122,11 @@ pub fn main() { if let Some("clippy") = std::env::args().nth(1).as_ref().map(AsRef::as_ref) { let args = wrap_args(std::env::args().skip(2), dep_path, sys_root); let path = std::env::current_exe().expect("current executable path invalid"); - let run = std::process::Command::new("cargo") + std::process::Command::new("cargo") .args(&args) .env("RUSTC", path) .spawn().expect("could not run cargo") - .wait().expect("failed to wait for cargo?") - .success(); - assert!(run, "cargo rustc failed"); + .wait().expect("failed to wait for cargo?"); } else { let args: Vec = if env::args().any(|s| s == "--sysroot") { env::args().collect() -- 2.44.0