File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,13 @@ impl Rustc {
6666
6767 /// Get a process builder set up to use the found rustc version, with a wrapper if Some
6868 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 ( )
7576 }
7677 }
7778
Original file line number Diff line number Diff line change @@ -684,3 +684,9 @@ fn proc_macro() {
684684 ) . build ( ) ;
685685 p. cargo ( "check -v" ) . env ( "RUST_LOG" , "cargo=trace" ) . run ( ) ;
686686}
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