Skip to content

Commit

Permalink
Fix test_app_start_without_rackup on JVM rubies
Browse files Browse the repository at this point in the history
truffleruby and jruby uses the childprocess with
CHILDPROCESS_POSIX_SPAWN, and when doing so, the environment variables
aren't cocered to strings until very late:
https://github.com/enkessler/childprocess/blob/v4.1.0/lib/childprocess/unix/posix_spawn_process.rb#L109-L130

On CRuby it seems symbol environment variables will overwrite any
existing (string) ones but that does not happen on JVM rubies (I've only
tested with TruffleRuby though, but JRuby builds also failed in CI)
  • Loading branch information
dentarg committed Jan 4, 2024
1 parent 41b73dd commit 0d5b0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/integration_start_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_app_start_without_rackup
app_file = File.join(__dir__, "integration", "simple_app.rb")
gem_file = File.join(__dir__, "integration", "gemfile_without_rackup.rb")
command = command_for(app_file)
env = { BUNDLE_GEMFILE: gem_file }
env = { "BUNDLE_GEMFILE" => gem_file }

with_process(command: command, env: env) do |process, read_io|
assert wait_for_output(read_io, /Sinatra could not start, the "rackup" gem was not found/)
Expand Down

0 comments on commit 0d5b0f6

Please sign in to comment.