summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDEVRAJ KUMAR <43830009+devraj-kumar@users.noreply.github.com>2020-04-11 03:50:19 +0530
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-05 07:32:42 +0900
commit9139acca66086d0d6c0867ff02b8cb8c338df5d4 (patch)
tree7c02ee995afd64e3467d1e9f799355de70c58841 /lib
parentf0ae5ac3135a6cf26666ec6ba33d34a738df7573 (diff)
[rubygems/rubygems] Fix `bundle info` not indicating a gem which has been deleted, unlike `bundle show`
Co-Authored-By: David Rodríguez <deivid.rodriguez@riseup.net> https://github.com/rubygems/rubygems/commit/2851b40ffb
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/info.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index c79c8bf814..7f4ef0d03a 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -40,10 +40,13 @@ module Bundler
end
def print_gem_path(spec)
- path = if spec.name == "bundler"
- File.expand_path("../../../..", __FILE__)
+ if spec.name == "bundler"
+ path = File.expand_path("../../../..", __FILE__)
else
- spec.full_gem_path
+ 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}"
+ end
end
Bundler.ui.info path