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.
fn build_clippy() {
let output = Command::new("cargo")
let status = Command::new("cargo")
.arg("build")
.output()
.status()
.expect("Failed to build clippy!");
if !output.status.success() {
eprintln!("Failed to compile Clippy");
eprintln!("stderr: {}", String::from_utf8_lossy(&output.stderr))
if !status.success() {
eprintln!("Error: Failed to compile Clippy!");
std::process::exit(1);
}
}