summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2021-10-09 11:28:05 +0200
committergit <svn-admin@ruby-lang.org>2021-10-11 19:13:15 +0900
commit607efe91540057ef0ca3be4a829869df018ee94a (patch)
tree5627fbc31520ebab675d374fd8101fd49251c105 /lib
parent62d1deb0d12b2a2ff77d7b5dfda57a32b1a0ac1c (diff)
[rubygems/rubygems] Show the exact name of the gem that was deleted
If a non exact name (matched as a regexp) is passed to `bundle info`, these strings might not match. https://github.com/rubygems/rubygems/commit/831edf1edf
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/info.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 3111b64a33..bf0f85d3eb 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -40,12 +40,13 @@ module Bundler
end
def print_gem_path(spec)
- if spec.name == "bundler"
+ name = spec.name
+ if name == "bundler"
path = File.expand_path("../../../..", __FILE__)
else
path = spec.full_gem_path
unless File.directory?(path)
- return Bundler.ui.warn "The gem #{gem_name} has been deleted. It was installed at: #{path}"
+ return Bundler.ui.warn "The gem #{name} has been deleted. It was installed at: #{path}"
end
end