File tree 2 files changed +13
-6
lines changed
2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,13 @@ impl Rustc {
66
66
67
67
/// Get a process builder set up to use the found rustc version, with a wrapper if Some
68
68
pub fn process ( & self ) -> ProcessBuilder {
69
- if let Some ( ref wrapper) = self . wrapper {
70
- let mut cmd = util:: process ( wrapper) ;
71
- cmd. arg ( & self . path ) ;
72
- cmd
73
- } else {
74
- self . process_no_wrapper ( )
69
+ match self . wrapper {
70
+ Some ( ref wrapper) if !wrapper. as_os_str ( ) . is_empty ( ) => {
71
+ let mut cmd = util:: process ( wrapper) ;
72
+ cmd. arg ( & self . path ) ;
73
+ cmd
74
+ }
75
+ _ => self . process_no_wrapper ( )
75
76
}
76
77
}
77
78
Original file line number Diff line number Diff line change @@ -684,3 +684,9 @@ fn proc_macro() {
684
684
) . build ( ) ;
685
685
p. cargo ( "check -v" ) . env ( "RUST_LOG" , "cargo=trace" ) . run ( ) ;
686
686
}
687
+
688
+ #[ test]
689
+ fn does_not_use_empty_rustc_wrapper ( ) {
690
+ let p = project ( ) . file ( "src/lib.rs" , "" ) . build ( ) ;
691
+ p. cargo ( "check" ) . env ( "RUSTC_WRAPPER" , "" ) . run ( ) ;
692
+ }
You can’t perform that action at this time.
0 commit comments