1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

runruby.rb: no PRELOAD on multiarch [ci skip]

* tool/runruby.rb: do not set environment to preload on multiarch
  platforms, otherwise other external commands (e.g., /bin/sh)
  fail to run.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-05-26 07:02:51 +00:00
parent 10ee38b6bc
commit 9ee48c0a7c

View file

@ -70,8 +70,8 @@ config["bindir"] = abs_archdir
env = {}
runner = File.join(abs_archdir, "ruby-runner#{config['EXEEXT']}")
runner = File.expand_path(ruby) unless File.exist?(runner)
env["RUBY"] = runner
runner = nil unless File.exist?(runner)
env["RUBY"] = runner || File.expand_path(ruby)
env["PATH"] = [abs_archdir, ENV["PATH"]].compact.join(File::PATH_SEPARATOR)
if e = ENV["RUBYLIB"]
@ -84,12 +84,14 @@ if File.file?(libruby_so)
if e = config['LIBPATHENV'] and !e.empty?
env[e] = [abs_archdir, ENV[e]].compact.join(File::PATH_SEPARATOR)
end
if e = config['PRELOADENV']
e = nil if e.empty?
e ||= "LD_PRELOAD" if /linux/ =~ RUBY_PLATFORM
end
if e
env[e] = [libruby_so, ENV[e]].compact.join(File::PATH_SEPARATOR)
unless runner
if e = config['PRELOADENV']
e = nil if e.empty?
e ||= "LD_PRELOAD" if /linux/ =~ RUBY_PLATFORM
end
if e
env[e] = [libruby_so, ENV[e]].compact.join(File::PATH_SEPARATOR)
end
end
end