Skip to content

Commit

Permalink
Merge pull request #14456 from Rylan12/api-language-support
Browse files Browse the repository at this point in the history
Support `languages` when installing from the API
  • Loading branch information
Rylan12 authored Feb 3, 2023
2 parents 820ec54 + 9d6713d commit af9ba41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Library/Homebrew/cask/cask_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,9 @@ def load(config:)

json_cask.deep_symbolize_keys!

# Download and use the cask source file if there are any `*flight` blocks
if json_cask[:artifacts].any? { |artifact| FLIGHT_STANZAS.include?(artifact.keys.first) }
# Use the cask-source API if there are any `*flight` blocks or the cask has multiple languages
if json_cask[:artifacts].any? { |artifact| FLIGHT_STANZAS.include?(artifact.keys.first) } ||
json_cask[:languages].any?
cask_source = Homebrew::API::Cask.fetch_source(token, git_head: json_cask[:tap_git_head])
return FromContentLoader.new(cask_source).load(config: config)
end
Expand Down

0 comments on commit af9ba41

Please sign in to comment.