File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2963,16 +2963,17 @@ impl Build {
29632963 /// Returns compiler path, optional modifier name from whitelist, and arguments vec
29642964 fn env_tool ( & self , name : & str ) -> Option < ( PathBuf , Option < String > , Vec < String > ) > {
29652965 let tool = match self . getenv_with_target_prefixes ( name) {
2966- Ok ( tool) => tool,
2967- Err ( _ ) => return None ,
2966+ Ok ( tool) if !tool . trim ( ) . is_empty ( ) => tool,
2967+ _ => return None ,
29682968 } ;
2969+ let tool = tool. trim ( ) ;
29692970
29702971 // If this is an exact path on the filesystem we don't want to do any
29712972 // interpretation at all, just pass it on through. This'll hopefully get
29722973 // us to support spaces-in-paths.
2973- if Path :: new ( & * tool) . exists ( ) {
2974+ if Path :: new ( tool) . exists ( ) {
29742975 return Some ( (
2975- PathBuf :: from ( & * tool) ,
2976+ PathBuf :: from ( tool) ,
29762977 Self :: rustc_wrapper_fallback ( ) ,
29772978 Vec :: new ( ) ,
29782979 ) ) ;
You can’t perform that action at this time.
0 commit comments