summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2023-12-11 17:28:10 +0100
committerHiroshi SHIBATA <[email protected]>2023-12-12 10:04:56 +0900
commitc032dfb5cbd844a8474a1397e65b4e04203d0ddd ()
treed964832ef226b74ef93803db783584d973c4ee3c
parent23289ad45bcf67e218352503958e2d788fbb6c2c (diff)
[rubygems/rubygems] Fix installing from source when same bundler version already a default gem
https://.com/rubygems/rubygems/commit/620119308e
-rw-r--r--lib/rubygems/commands/setup_command.rb16
1 files changed, 8 insertions, 8 deletions
@@ -373,12 +373,12 @@ By default, this RubyGems will install gem as:
target_specs_dir
end
- bundler_spec = Dir.chdir("bundler") { Gem::Specification.load("bundler.gemspec") }
- full_name = bundler_spec.full_name
gemspec_path = "#{full_name}.gemspec"
default_spec_path = File.join(specs_dir, gemspec_path)
- Gem.write_binary(default_spec_path, bundler_spec.to_ruby)
bundler_spec = Gem::Specification.load(default_spec_path)
@@ -395,16 +395,16 @@ By default, this RubyGems will install gem as:
each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) }
end
- bundler_bin_dir = bundler_spec.bin_dir
mkdir_p bundler_bin_dir, mode: 0o755
bundler_spec.executables.each do |e|
- cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_bin_dir, e)
end
require_relative "../installer"
Dir.chdir("bundler") do
- built_gem = Gem::Package.build(bundler_spec)
begin
Gem::Installer.at(
built_gem,
@@ -421,9 +421,9 @@ By default, this RubyGems will install gem as:
end
end
- bundler_spec.executables.each {|executable| bin_file_names << target_bin_path(bin_dir, executable) }
- say "Bundler #{bundler_spec.version} installed"
end
def make_destination_dirs