diff --git a/Library/Homebrew/context.rb b/Library/Homebrew/context.rb index 801f34faab..46f57a0ce5 100644 --- a/Library/Homebrew/context.rb +++ b/Library/Homebrew/context.rb @@ -63,7 +63,7 @@ module Context end def with_context(**options) - old_context = Thread.current[:context] + old_context = Context.current new_context = ContextStruct.new( debug: options.fetch(:debug, old_context&.debug?),