From d22511fd7595ef1819baa42851d598d95b8f4d00 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 19 Jan 2022 13:28:23 +0900 Subject: Merge rubygems/rubygems HEAD. Picked at 12aeef6ba9a3be0022be9934c1a3e4c46a03ed3a --- lib/bundler/cli.rb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'lib/bundler/cli.rb') 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 -- cgit v1.2.3