Commit b9ca7654 authored by Kyle Fuller's avatar Kyle Fuller

[HooksManager] Fix whitelisted plugins hooks not fired

We're incorrectly comparing the hook name instead of the plugin name in
the whitelist
parent 24cc2d80
...@@ -99,12 +99,12 @@ module Pod ...@@ -99,12 +99,12 @@ module Pod
if hooks if hooks
UI.message "- Running #{name.to_s.gsub('_', ' ')} hooks" do UI.message "- Running #{name.to_s.gsub('_', ' ')} hooks" do
hooks.each do |hook| hooks.each do |hook|
next if whitelisted_plugins && !whitelisted_plugins.key?(hook.name) next if whitelisted_plugins && !whitelisted_plugins.key?(hook.plugin_name)
UI.message "- #{hook.plugin_name || 'unknown plugin'} from " \ UI.message "- #{hook.plugin_name || 'unknown plugin'} from " \
"`#{hook.block.source_location.first}`" do "`#{hook.block.source_location.first}`" do
block = hook.block block = hook.block
if block.arity > 1 if block.arity > 1
block.call(context, whitelisted_plugins[hook.name]) block.call(context, whitelisted_plugins[hook.plugin_name])
else else
block.call(context) block.call(context)
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment