diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-07-23 15:53:59 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-27 09:25:55 +0900 |
commit | 6bcedabfdde74a21b8e1c93ec639afbb9698474b (patch) | |
tree | ef46e395fdbc530b21f87b6d48f198d11dfde891 /lib/bundler/installer/gem_installer.rb | |
parent | 6eb6f740f2c87ed7400b7423d2e80999232e66ff (diff) | |
download | ruby-6bcedabfdde74a21b8e1c93ec639afbb9698474b.tar.gz |
[rubygems/rubygems] Remove `gem install` hint when installing a gem fails
A fresh `gem install` might not reproduce the exact `bundle install`
environment that originally caused the error. It also makes it harder
for the user to troubleshoot the error since she needs to run a separate
command.
Instead, show the original error and backtrace directly.
https://github.com/rubygems/rubygems/commit/49c2abfec6
Diffstat (limited to 'lib/bundler/installer/gem_installer.rb')
-rw-r--r-- | lib/bundler/installer/gem_installer.rb | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/bundler/installer/gem_installer.rb b/lib/bundler/installer/gem_installer.rb index a117d5022d..10b7f6ce04 100644 --- a/lib/bundler/installer/gem_installer.rb +++ b/lib/bundler/installer/gem_installer.rb @@ -37,25 +37,13 @@ module Bundler end def failure_message - return install_error_message if spec.source.options["git"] - "#{install_error_message}\n#{gem_install_message}" + install_error_message end def install_error_message "An error occurred while installing #{spec.name} (#{spec.version}), and Bundler cannot continue." end - def gem_install_message - source = spec.source - return unless source.respond_to?(:remotes) - - if source.remotes.size == 1 - "Make sure that `gem install #{spec.name} -v '#{spec.version}' --source '#{source.remotes.first}'` succeeds before bundling." - else - "Make sure that `gem install #{spec.name} -v '#{spec.version}'` succeeds before bundling." - end - end - def spec_settings # Fetch the build settings, if there are any if settings = Bundler.settings["build.#{spec.name}"] |