lintheck: show output (and compiler errors!) when compiling clippy for lintcheck

This commit is contained in:
Matthias Krüger 2021-02-19 21:52:34 +01:00
parent bb5f9d18a0
commit d198551311

View file

@ -295,13 +295,13 @@ fn filter_clippy_warnings(line: &str) -> bool {
/// Builds clippy inside the repo to make sure we have a clippy executable we can use. /// Builds clippy inside the repo to make sure we have a clippy executable we can use.
fn build_clippy() { fn build_clippy() {
let output = Command::new("cargo") let status = Command::new("cargo")
.arg("build") .arg("build")
.output() .status()
.expect("Failed to build clippy!"); .expect("Failed to build clippy!");
if !output.status.success() { if !status.success() {
eprintln!("Failed to compile Clippy"); eprintln!("Error: Failed to compile Clippy!");
eprintln!("stderr: {}", String::from_utf8_lossy(&output.stderr)) std::process::exit(1);
} }
} }