File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
crates/proc-macro-api/src Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -131,12 +131,19 @@ impl Process {
131
131
}
132
132
133
133
fn mk_child ( path : & AbsPath , null_stderr : bool ) -> io:: Result < Child > {
134
- Command :: new ( path. as_os_str ( ) )
135
- . env ( "RUST_ANALYZER_INTERNALS_DO_NOT_USE" , "this is unstable" )
134
+ let mut cmd = Command :: new ( path. as_os_str ( ) ) ;
135
+ cmd . env ( "RUST_ANALYZER_INTERNALS_DO_NOT_USE" , "this is unstable" )
136
136
. stdin ( Stdio :: piped ( ) )
137
137
. stdout ( Stdio :: piped ( ) )
138
- . stderr ( if null_stderr { Stdio :: null ( ) } else { Stdio :: inherit ( ) } )
139
- . spawn ( )
138
+ . stderr ( if null_stderr { Stdio :: null ( ) } else { Stdio :: inherit ( ) } ) ;
139
+ if cfg ! ( windows) {
140
+ let mut path_var = std:: ffi:: OsString :: new ( ) ;
141
+ path_var. push ( path. parent ( ) . unwrap ( ) . parent ( ) . unwrap ( ) . as_os_str ( ) ) ;
142
+ path_var. push ( "\\ bin;" ) ;
143
+ path_var. push ( std:: env:: var_os ( "PATH" ) . unwrap_or_default ( ) ) ;
144
+ cmd. env ( "PATH" , path_var) ;
145
+ }
146
+ cmd. spawn ( )
140
147
}
141
148
142
149
fn send_request (
You can’t perform that action at this time.
0 commit comments