Prefer ruby_install_name as runner
`Gem::Commands::EnvironmentCommand` expects that `Gem.ruby` has the transformed basename.
This commit is contained in:
parent
7561db8c00
commit
838d695c16
@ -85,7 +85,8 @@ config = File.read(conffile)
|
|||||||
config.sub!(/^(\s*)RUBY_VERSION\b.*(\sor\s*)\n.*\n/, '')
|
config.sub!(/^(\s*)RUBY_VERSION\b.*(\sor\s*)\n.*\n/, '')
|
||||||
config = Module.new {module_eval(config, conffile)}::RbConfig::CONFIG
|
config = Module.new {module_eval(config, conffile)}::RbConfig::CONFIG
|
||||||
|
|
||||||
ruby = File.join(archdir, config["RUBY_INSTALL_NAME"]+config['EXEEXT'])
|
install_name = config["RUBY_INSTALL_NAME"]+config['EXEEXT']
|
||||||
|
ruby = File.join(archdir, install_name)
|
||||||
unless File.exist?(ruby)
|
unless File.exist?(ruby)
|
||||||
abort "#{ruby} is not found.\nTry `make' first, then `make test', please.\n"
|
abort "#{ruby} is not found.\nTry `make' first, then `make test', please.\n"
|
||||||
end
|
end
|
||||||
@ -106,7 +107,7 @@ env = {
|
|||||||
'RUBY_FIBER_MACHINE_STACK_SIZE' => '1',
|
'RUBY_FIBER_MACHINE_STACK_SIZE' => '1',
|
||||||
}
|
}
|
||||||
|
|
||||||
runner = File.join(abs_archdir, "exe/ruby#{config['EXEEXT']}")
|
runner = File.join(abs_archdir, "exe/#{install_name}")
|
||||||
runner = nil unless File.exist?(runner)
|
runner = nil unless File.exist?(runner)
|
||||||
abs_ruby = runner || File.expand_path(ruby)
|
abs_ruby = runner || File.expand_path(ruby)
|
||||||
env["RUBY"] = abs_ruby
|
env["RUBY"] = abs_ruby
|
||||||
|
Loading…
x
Reference in New Issue
Block a user