From bb4f41ea432d9544e3620ad4e4f4420888c6d8c4 Mon Sep 17 00:00:00 2001 From: Nanda H Krishna Date: Thu, 2 Mar 2023 23:29:09 -0500 Subject: [PATCH] api: fix `bottle_tag` identification --- Library/Homebrew/api.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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