mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
[rubygems/rubygems] Fix binstubs and plugins regeneration with --destdir
is used
7079de16fa
This commit is contained in:
parent
62957debd5
commit
ed7a50015a
1 changed files with 6 additions and 4 deletions
|
@ -182,8 +182,8 @@ By default, this RubyGems will install gem as:
|
||||||
|
|
||||||
say "RubyGems #{Gem::VERSION} installed"
|
say "RubyGems #{Gem::VERSION} installed"
|
||||||
|
|
||||||
regenerate_binstubs if options[:regenerate_binstubs]
|
regenerate_binstubs(bin_dir) if options[:regenerate_binstubs]
|
||||||
regenerate_plugins if options[:regenerate_plugins]
|
regenerate_plugins(bin_dir) if options[:regenerate_plugins]
|
||||||
|
|
||||||
uninstall_old_gemcutter
|
uninstall_old_gemcutter
|
||||||
|
|
||||||
|
@ -582,11 +582,12 @@ abort "#{deprecation_message}"
|
||||||
rescue Gem::InstallError
|
rescue Gem::InstallError
|
||||||
end
|
end
|
||||||
|
|
||||||
def regenerate_binstubs
|
def regenerate_binstubs(bindir)
|
||||||
require_relative "pristine_command"
|
require_relative "pristine_command"
|
||||||
say "Regenerating binstubs"
|
say "Regenerating binstubs"
|
||||||
|
|
||||||
args = %w[--all --only-executables --silent]
|
args = %w[--all --only-executables --silent]
|
||||||
|
args << "--bindir=#{bindir}"
|
||||||
if options[:env_shebang]
|
if options[:env_shebang]
|
||||||
args << "--env-shebang"
|
args << "--env-shebang"
|
||||||
end
|
end
|
||||||
|
@ -595,11 +596,12 @@ abort "#{deprecation_message}"
|
||||||
command.invoke(*args)
|
command.invoke(*args)
|
||||||
end
|
end
|
||||||
|
|
||||||
def regenerate_plugins
|
def regenerate_plugins(bindir)
|
||||||
require_relative "pristine_command"
|
require_relative "pristine_command"
|
||||||
say "Regenerating plugins"
|
say "Regenerating plugins"
|
||||||
|
|
||||||
args = %w[--all --only-plugins --silent]
|
args = %w[--all --only-plugins --silent]
|
||||||
|
args << "--bindir=#{bindir}"
|
||||||
|
|
||||||
command = Gem::Commands::PristineCommand.new
|
command = Gem::Commands::PristineCommand.new
|
||||||
command.invoke(*args)
|
command.invoke(*args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue