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 @@ -162,12 +162,19 @@ impl Process {
162162}
163163
164164fn 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" )
167167 . stdin ( Stdio :: piped ( ) )
168168 . 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 ( )
171178}
172179
173180fn send_request (
You can’t perform that action at this time.
0 commit comments