File tree 1 file changed +11
-4
lines changed
crates/proc-macro-api/src
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -162,12 +162,19 @@ impl Process {
162
162
}
163
163
164
164
fn mk_child ( path : & AbsPath , null_stderr : bool ) -> io:: Result < Child > {
165
- Command :: new ( path. as_os_str ( ) )
166
- . env ( "RUST_ANALYZER_INTERNALS_DO_NOT_USE" , "this is unstable" )
165
+ let mut cmd = Command :: new ( path. as_os_str ( ) ) ;
166
+ cmd . env ( "RUST_ANALYZER_INTERNALS_DO_NOT_USE" , "this is unstable" )
167
167
. stdin ( Stdio :: piped ( ) )
168
168
. stdout ( Stdio :: piped ( ) )
169
- . stderr ( if null_stderr { Stdio :: null ( ) } else { Stdio :: inherit ( ) } )
170
- . spawn ( )
169
+ . stderr ( if null_stderr { Stdio :: null ( ) } else { Stdio :: inherit ( ) } ) ;
170
+ if cfg ! ( windows) {
171
+ let mut path_var = std:: ffi:: OsString :: new ( ) ;
172
+ path_var. push ( path. parent ( ) . unwrap ( ) . parent ( ) . unwrap ( ) . as_os_str ( ) ) ;
173
+ path_var. push ( "\\ bin;" ) ;
174
+ path_var. push ( std:: env:: var_os ( "PATH" ) . unwrap_or_default ( ) ) ;
175
+ cmd. env ( "PATH" , path_var) ;
176
+ }
177
+ cmd. spawn ( )
171
178
}
172
179
173
180
fn send_request (
You can’t perform that action at this time.
0 commit comments