mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
Merge pull request #2863 from Fraser999/exit_code
Ensure a non-zero value is returned by clippy if compilation fails
This commit is contained in:
commit
dbc9e3674f
@ -13,7 +13,7 @@ extern crate rustc_plugin;
|
||||
extern crate syntax;
|
||||
|
||||
use rustc_driver::{driver::CompileController, Compilation};
|
||||
use std::process::Command;
|
||||
use std::process::{exit, Command};
|
||||
|
||||
#[allow(print_stdout)]
|
||||
fn show_version() {
|
||||
@ -133,5 +133,10 @@ pub fn main() {
|
||||
}
|
||||
controller.compilation_done.stop = Compilation::Stop;
|
||||
|
||||
rustc_driver::run_compiler(&args, Box::new(controller), None, None);
|
||||
if rustc_driver::run_compiler(&args, Box::new(controller), None, None)
|
||||
.0
|
||||
.is_err()
|
||||
{
|
||||
exit(101);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user