File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed
Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -388,19 +388,8 @@ describe Process do
388388 end
389389 {% end % }
390390
391- if {{ flag?(:win32 ) }}
392- it " finds binary in parent `$PATH`, not `env`" do
393- Process .run(* print_env_command, env: {" PATH" => " " })
394- end
395- else
396- # FIXME: This behaviour is incorrect. It should lookup the command in
397- # the parent process' `$PATH`, without any changes from `env`.
398- # https://github.com/crystal-lang/crystal/issues/6464#issuecomment-3391000914
399- it " finds binary in `env`" do
400- expect_raises(File ::NotFoundError ) do
401- Process .run(* print_env_command, env: {" PATH" => " " })
402- end
403- end
391+ it " finds binary in parent `$PATH`, not `env`" do
392+ Process .run(* print_env_command, env: {" PATH" => " " })
404393 end
405394
406395 it " errors on invalid key" do
Original file line number Diff line number Diff line change @@ -342,10 +342,10 @@ struct Crystal::System::Process
342342 reopen_io(output, ORIGINAL_STDOUT )
343343 reopen_io(error, ORIGINAL_STDERR )
344344
345- LibC .environ = Env .make_envp(env, clear_env)
345+ envp = Env .make_envp(env, clear_env)
346346 ::Dir .cd(chdir) if chdir
347347
348- execvpe(* prepared_args, LibC .environ )
348+ execvpe(* prepared_args, envp )
349349 end
350350
351351 private def self.execvpe (file , argv , envp )
You can’t perform that action at this time.
0 commit comments