diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-01-19 13:28:23 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-01-19 15:01:44 +0900 |
commit | d22511fd7595ef1819baa42851d598d95b8f4d00 (patch) | |
tree | 83e823c033f5c39c314cf4379f0bac5c43adf3d4 /lib/bundler/cli.rb | |
parent | 5646f4b67b75e7e558c994ff8cbd374e4b4bd3b5 (diff) |
Merge rubygems/rubygems HEAD.
Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5462
Diffstat (limited to 'lib/bundler/cli.rb')
-rw-r--r-- | lib/bundler/cli.rb | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index f6e20e7c67..16651dfad9 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -809,17 +809,10 @@ module Bundler current = Gem::Version.new(VERSION) return if current >= latest - latest_installed = Bundler.rubygems.find_name("bundler").map(&:version).max - installation = "To install the latest version, run `gem install bundler#{" --pre" if latest.prerelease?}`" - if latest_installed && latest_installed > current - suggestion = "To update to the most recent installed version (#{latest_installed}), run `bundle update --bundler`" - suggestion = "#{installation}\n#{suggestion}" if latest_installed < latest - else - suggestion = installation - end - - Bundler.ui.warn "The latest bundler is #{latest}, but you are currently running #{current}.\n#{suggestion}" + Bundler.ui.warn \ + "The latest bundler is #{latest}, but you are currently running #{current}.\n" \ + "To update to the most recent version, run `bundle update --bundler`" rescue RuntimeError nil end |