bump-cask-pr: avoid replacing sha256 twice on multilang cask

this script always get `inreplace failed` on cask like firefox because the
default sha256 is replaced twice
This commit is contained in:
xxyzz 2021-12-21 16:12:29 +08:00
parent 96137bc19e
commit fb415a15e9
No known key found for this signature in database
GPG Key ID: F796163E6DCFEE9D

View File

@ -153,7 +153,7 @@ module Homebrew
end
end
if new_hash.present?
if new_hash.present? && cask.language.blank?
hash_regex = old_hash == :no_check ? ":no_check" : "[\"']#{Regexp.escape(old_hash.to_s)}[\"']"
replacement_pairs << [