diff options
author | Eric Wong <bofh@yhbt.net> | 2024-04-07 10:52:38 +0000 |
---|---|---|
committer | Eric Wong <BOFH@YHBT.net> | 2024-04-15 23:17:35 +0000 |
commit | 6c9c442fb6aa12fd871237bc2bb5aec56c5b3538 (patch) | |
tree | 77dc70e30cb9ddccdd17e119a1a320538e3566d8 | |
parent | e9a73410630fbc46f547ab5c5d24efb2c569bb69 (diff) | |
download | unicorn-master.tar.gz |
We can't rely on `ruby -I $PATH' args being passed to subprocesses, so rely on the RUBYLIB environment instead.
-rw-r--r-- | t/lib.perl | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -240,7 +240,9 @@ sub unicorn { state $eng = $ENV{TEST_RUBY_ENGINE} // `$ruby -e 'print RUBY_ENGINE'`; state $ext = File::Spec->rel2abs("test/$eng-$ver/ext/unicorn_http"); state $exe = File::Spec->rel2abs("test/$eng-$ver/bin/unicorn"); - my $pid = spawn(\%env, $ruby, '-I', $lib, '-I', $ext, $exe, @args); + state $rl = $ENV{RUBYLIB} ? "$lib:$ext:$ENV{RUBYLIB}" : "$lib:$ext"; + $env{RUBYLIB} = $rl; + my $pid = spawn(\%env, $ruby, $exe, @args); UnicornTest::AutoReap->new($pid); } |