Merge pull request #12608 from xxyzz/fix-bump-multilang-cask
bump-cask-pr: avoid replacing sha256 twice on multilang cask
This commit is contained in:
commit
537036ab36
@ -145,15 +145,13 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
cask.languages.each do |language|
|
cask.languages.each do |language|
|
||||||
next if language == cask.language
|
|
||||||
|
|
||||||
lang_config = tmp_config.merge(Cask::Config.new(explicit: { languages: [language] }))
|
lang_config = tmp_config.merge(Cask::Config.new(explicit: { languages: [language] }))
|
||||||
replacement_pairs << fetch_cask(tmp_contents, config: lang_config)
|
replacement_pairs << fetch_cask(tmp_contents, config: lang_config)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if new_hash.present?
|
if new_hash.present? && cask.language.blank? # avoid repeated replacement for multilanguage cask
|
||||||
hash_regex = old_hash == :no_check ? ":no_check" : "[\"']#{Regexp.escape(old_hash.to_s)}[\"']"
|
hash_regex = old_hash == :no_check ? ":no_check" : "[\"']#{Regexp.escape(old_hash.to_s)}[\"']"
|
||||||
|
|
||||||
replacement_pairs << [
|
replacement_pairs << [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user