Fix depends_on arch: when loading casks from API

This commit is contained in:
Rylan Polster 2023-01-10 12:35:39 -05:00
parent adfd868831
commit 6468897458
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -240,6 +240,12 @@ module Cask
if json_cask[:depends_on].present? if json_cask[:depends_on].present?
dep_hash = json_cask[:depends_on].to_h do |dep_key, dep_value| dep_hash = json_cask[:depends_on].to_h do |dep_key, dep_value|
if dep_key == :arch
next [:arch, :intel] if dep_value.first[:type] == "intel"
next [:arch, :arm64]
end
next [dep_key, dep_value] unless dep_key == :macos next [dep_key, dep_value] unless dep_key == :macos
dep_type = dep_value.keys.first dep_type = dep_value.keys.first