Merge pull request #9122 from SeekingMeaning/bump-cask-pr/languages

bump-cask-pr: fix for casks that have multiple languages
This commit is contained in:
Seeker 2020-11-13 09:45:57 -08:00 committed by GitHub
commit fa61eefa15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,6 +143,7 @@ module Homebrew
silent: true)
tmp_cask = Cask::CaskLoader.load(tmp_contents)
tmp_config = cask.config
tmp_url = tmp_cask.url.to_s
if new_hash.nil?
@ -154,9 +155,9 @@ module Homebrew
cask.languages.each do |language|
next if language == cask.language
tmp_cask.config.languages = [language]
lang_config = tmp_config.merge(Cask::Config.new(explicit: { languages: [language] }))
lang_cask = Cask::CaskLoader.load(tmp_contents)
lang_cask.config = lang_config
lang_url = lang_cask.url.to_s
lang_old_hash = lang_cask.sha256