diff --git a/Library/Homebrew/hooks/bottles.rb b/Library/Homebrew/hooks/bottles.rb index de321c09af..6f6ce7e475 100644 --- a/Library/Homebrew/hooks/bottles.rb +++ b/Library/Homebrew/hooks/bottles.rb @@ -26,6 +26,10 @@ module Homebrew return false unless @pour_bottle @pour_bottle.call formula end + + def self.reset_hooks + @has_bottle = @pour_bottle = nil + end end end end diff --git a/Library/Homebrew/test/test_bottle_hooks.rb b/Library/Homebrew/test/test_bottle_hooks.rb index 8c66bce533..92dca6dff7 100644 --- a/Library/Homebrew/test/test_bottle_hooks.rb +++ b/Library/Homebrew/test/test_bottle_hooks.rb @@ -37,4 +37,8 @@ class BottleHookTests < Homebrew::TestCase end @fi.pour end + + def teardown + Homebrew::Hooks::Bottles.reset_hooks + end end