diff --git a/Library/Homebrew/api.rb b/Library/Homebrew/api.rb index 9b60a85b3c..daa1e30f53 100644 --- a/Library/Homebrew/api.rb +++ b/Library/Homebrew/api.rb @@ -159,8 +159,10 @@ module Homebrew sig { params(json: Hash).returns(Hash) } def self.merge_variations(json) - if (bottle_tag = ::Utils::Bottles.tag.to_s.presence) && - (variations = json["variations"].presence) && + bottle_tag = ::Utils::Bottles::Tag.new(system: Homebrew::SimulateSystem.current_os, + arch: Homebrew::SimulateSystem.current_arch) + + if (variations = json["variations"].presence) && (variation = variations[bottle_tag].presence) json = json.merge(variation) end