mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Puma::Launcher: avoid a leading space character in RUBYOPT (#1455)
The problem is this: ``` 2.4.2 :001 > [nil, 'foo'].join(' ') => " foo" ``` Note the leading space character. By `lstrip`:ing the result of the join, we avoid this altogether. (This is a fix for the underlying problem that triggered https://github.com/jruby/jruby/issues/4849.)
This commit is contained in:
parent
42b74d4f45
commit
ac7106e96d
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ module Puma
|
|||
env = Bundler::ORIGINAL_ENV.dup
|
||||
# add -rbundler/setup so we load from Gemfile when restarting
|
||||
bundle = "-rbundler/setup"
|
||||
env["RUBYOPT"] = [env["RUBYOPT"], bundle].join(" ") unless env["RUBYOPT"].to_s.include?(bundle)
|
||||
env["RUBYOPT"] = [env["RUBYOPT"], bundle].join(" ").lstrip unless env["RUBYOPT"].to_s.include?(bundle)
|
||||
env
|
||||
else
|
||||
ENV.to_h
|
||||
|
|
Loading…
Add table
Reference in a new issue