summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
diff options
context:
space:
mode:
authorDavid Rodriguez <deivid.rodriguez@riseup.net>2021-10-09 13:42:05 +0200
committergit <svn-admin@ruby-lang.org>2021-10-13 16:21:42 +0900
commit0f1f95a3e3011b6c61fdc455e4078e5e231548e3 (patch)
tree1ab166b20745e80b9a89118e8170fc6b4e91b7d4 /lib/bundler/cli
parentbd87397f73c36f1428b4cf8de24918b98fa71c8a (diff)
[rubygems/rubygems] Fix `bundle install` to force reinstallation of deleted gems
https://github.com/rubygems/rubygems/commit/8950631f02
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r--lib/bundler/cli/info.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 00140e3bd1..3afed89ceb 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -45,7 +45,7 @@ module Bundler
path = File.expand_path("../../../..", __FILE__)
else
path = spec.full_gem_path
- unless File.directory?(path)
+ if spec.deleted_gem?
return Bundler.ui.warn "The gem #{name} has been deleted. It was installed at: #{path}"
end
end
@@ -56,7 +56,6 @@ module Bundler
def print_gem_info(spec)
metadata = spec.metadata
name = spec.name
- path = spec.full_gem_path
gem_info = String.new
gem_info << " * #{name} (#{spec.version}#{spec.git_version})\n"
gem_info << "\tSummary: #{spec.summary}\n" if spec.summary
@@ -68,10 +67,10 @@ module Bundler
gem_info << "\tChangelog: #{metadata["changelog_uri"]}\n" if metadata.key?("changelog_uri")
gem_info << "\tBug Tracker: #{metadata["bug_tracker_uri"]}\n" if metadata.key?("bug_tracker_uri")
gem_info << "\tMailing List: #{metadata["mailing_list_uri"]}\n" if metadata.key?("mailing_list_uri")
- gem_info << "\tPath: #{path}\n"
+ gem_info << "\tPath: #{spec.full_gem_path}\n"
gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
- unless File.directory?(path)
+ if spec.deleted_gem?
return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
end