summaryrefslogtreecommitdiff
path: root/lib/bundler/plugin.rb
diff options
context:
space:
mode:
authorCody Cutrer <[email protected]>2023-09-14 11:58:11 -0600
committergit <[email protected]>2023-10-31 13:53:05 +0000
commitb5d54fc15955c636cc37b76931a6e3ce1d209f70 (patch)
tree7da4e02c511b321b92d235371e6c8f24a7b63fcb /lib/bundler/plugin.rb
parentb06b69e6dc004fd275984bb42f05caa86e487566 (diff)
[rubygems/rubygems] Only remove bundler plugin gem when it's inside the cache
https://github.com/rubygems/rubygems/commit/8d51390ca4
Diffstat (limited to 'lib/bundler/plugin.rb')
-rw-r--r--lib/bundler/plugin.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/plugin.rb b/lib/bundler/plugin.rb
index e6aaa6b464..edd1900135 100644
--- a/lib/bundler/plugin.rb
+++ b/lib/bundler/plugin.rb
@@ -62,7 +62,8 @@ module Bundler
if names.any?
names.each do |name|
if index.installed?(name)
- Bundler.rm_rf(index.plugin_path(name))
+ path = index.plugin_path(name).to_s
+ Bundler.rm_rf(path) if index.installed_in_plugin_root?(name)
index.unregister_plugin(name)
Bundler.ui.info "Uninstalled plugin #{name}"
else