api: fix bottle_tag identification
This commit is contained in:
parent
3113b44d1f
commit
bb4f41ea43
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user