diff options
author | Samuel Giddins <[email protected]> | 2023-02-12 19:19:17 -0800 |
---|---|---|
committer | git <[email protected]> | 2023-02-22 08:42:16 +0000 |
commit | 612ebd10c061fefd6e4f1f736a95188bd6ae5146 (patch) | |
tree | d48c8d2e5d2f85bfc0708d2eebfcc2afa7c530f5 /lib | |
parent | 3f0f9a7942a90f4dd6069e6074ea6211fe5d0bc5 (diff) |
[rubygems/rubygems] Ensure dependencies are updated by default when running gem exec
https://github.com/rubygems/rubygems/commit/664f3e1e5f
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/commands/exec_command.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rubygems/commands/exec_command.rb b/lib/rubygems/commands/exec_command.rb index 53b32c6353..be76980410 100644 --- a/lib/rubygems/commands/exec_command.rb +++ b/lib/rubygems/commands/exec_command.rb @@ -118,7 +118,7 @@ to the same gem path as user-installed gems. max_length = opts.map {|k, _| k.size }.max opts.each do |k, v| next if v.nil? - verbose "\t#{k.to_s.rjust(max_length)}: #{v} " + verbose "\t#{k.to_s.rjust(max_length)}: #{v}" end verbose "" end @@ -127,6 +127,7 @@ to the same gem path as user-installed gems. activate! rescue Gem::MissingSpecError verbose "#{Gem::Dependency.new(options[:gem_name], options[:version])} not available locally, installing from remote" + verbose "\t#{Gem::Specification.all_names}" install activate! end @@ -135,12 +136,11 @@ to the same gem path as user-installed gems. gem_name = options[:gem_name] gem_version = options[:version] - home = Gem.paths.home - home = File.join(home, "gem_exec") - Gem.use_paths(home, Gem.path + [home]) + home = File.join(Gem.dir, "gem_exec") + Gem.use_paths(home, [home] + Gem.path) suppress_always_install do - Gem.install(gem_name, gem_version) + Gem.install(gem_name, gem_version, minimal_deps: false) end rescue Gem::InstallError => e alert_error "Error installing #{gem_name}:\n\t#{e.message}" |