aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/plugin/index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/plugin/index.rb')
-rw-r--r--lib/bundler/plugin/index.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bundler/plugin/index.rb b/lib/bundler/plugin/index.rb
index a2d5eaa38a..c2ab8f90da 100644
--- a/lib/bundler/plugin/index.rb
+++ b/lib/bundler/plugin/index.rb
@@ -136,6 +136,14 @@ module Bundler
@hooks[event] || []
end
+ # This plugin is installed inside the .bundle/plugin directory,
+ # and thus is managed solely by Bundler
+ def installed_in_plugin_root?(name)
+ return false unless (path = installed?(name))
+
+ path.start_with?("#{Plugin.root}/")
+ end
+
private
# Reads the index file from the directory and initializes the instance