@@ -78,21 +78,27 @@ fn main() -> Result<(), ExitStatus> {
78
78
) ;
79
79
80
80
let verbose = matches. get_flag ( "verbose" ) ;
81
+ let dev_build = cfg ! ( feature = "dev-build" ) ;
81
82
82
83
if matches. get_flag ( "version" ) {
83
84
print_version ( verbose) ;
84
85
return Ok ( ( ) ) ;
85
86
}
86
87
87
88
match matches. subcommand ( ) {
88
- Some ( ( "setup" , _args) ) => driver:: install_driver ( verbose) ,
89
- Some ( ( "check" , args) ) => run_check ( args, verbose) ,
90
- None => run_check ( & matches, verbose) ,
89
+ Some ( ( "setup" , _args) ) => driver:: install_driver ( verbose, dev_build ) ,
90
+ Some ( ( "check" , args) ) => run_check ( args, verbose, dev_build ) ,
91
+ None => run_check ( & matches, verbose, dev_build ) ,
91
92
_ => unreachable ! ( ) ,
92
93
}
93
94
}
94
95
95
- fn run_check ( matches : & clap:: ArgMatches , verbose : bool ) -> Result < ( ) , ExitStatus > {
96
+ fn run_check ( matches : & clap:: ArgMatches , verbose : bool , dev_build : bool ) -> Result < ( ) , ExitStatus > {
97
+ // If this is a dev build, we want to recompile the driver before checking
98
+ if dev_build {
99
+ driver:: install_driver ( verbose, dev_build) ?;
100
+ }
101
+
96
102
let mut lint_crates = vec ! [ ] ;
97
103
if let Some ( cmd_lint_crates) = matches. get_many :: < OsString > ( "lints" ) {
98
104
println ! ( ) ;
0 commit comments