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) }
|
sig { params(json: Hash).returns(Hash) }
|
||||||
def self.merge_variations(json)
|
def self.merge_variations(json)
|
||||||
if (bottle_tag = ::Utils::Bottles.tag.to_s.presence) &&
|
bottle_tag = ::Utils::Bottles::Tag.new(system: Homebrew::SimulateSystem.current_os,
|
||||||
(variations = json["variations"].presence) &&
|
arch: Homebrew::SimulateSystem.current_arch)
|
||||||
|
|
||||||
|
if (variations = json["variations"].presence) &&
|
||||||
(variation = variations[bottle_tag].presence)
|
(variation = variations[bottle_tag].presence)
|
||||||
json = json.merge(variation)
|
json = json.merge(variation)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user