Merge pull request #16273 from Bo98/bump-cask-pr-sha256
dev-cmd/bump-cask-pr: fix --sha256
This commit is contained in:
commit
0e5018870f
@ -208,10 +208,10 @@ module Homebrew
|
|||||||
replacement_pairs << [/"#{old_hash}"/, ":no_check"] if old_hash != :no_check
|
replacement_pairs << [/"#{old_hash}"/, ":no_check"] if old_hash != :no_check
|
||||||
elsif old_hash == :no_check && new_hash != :no_check
|
elsif old_hash == :no_check && new_hash != :no_check
|
||||||
replacement_pairs << [":no_check", "\"#{new_hash}\""] if new_hash.is_a?(String)
|
replacement_pairs << [":no_check", "\"#{new_hash}\""] if new_hash.is_a?(String)
|
||||||
|
elsif new_hash && !cask.on_system_blocks_exist? && cask.languages.empty?
|
||||||
|
replacement_pairs << [old_hash.to_s, new_hash.to_s]
|
||||||
elsif old_hash != :no_check
|
elsif old_hash != :no_check
|
||||||
if new_hash && cask.languages.present?
|
opoo "Multiple checksum replacements required; ignoring specified `--sha256` argument." if new_hash
|
||||||
opoo "Multiple checksum replacements required; ignoring specified `--sha256` argument."
|
|
||||||
end
|
|
||||||
languages = if cask.languages.empty?
|
languages = if cask.languages.empty?
|
||||||
[nil]
|
[nil]
|
||||||
else
|
else
|
||||||
@ -232,9 +232,6 @@ module Homebrew
|
|||||||
download.sha256]
|
download.sha256]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
elsif new_hash
|
|
||||||
opoo "Cask contains multiple hashes; only updating hash for current arch." if cask.on_system_blocks_exist?
|
|
||||||
replacement_pairs << [old_hash.to_s, new_hash.to_s]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user