Merge pull request #4871 from reitermarkus/no-check

Don’t add error when changing checksum to `:no_check`.
This commit is contained in:
Markus Reiter 2018-09-11 14:48:49 +02:00 committed by GitHub
commit ca86f07039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,8 @@ module Cask
end
def check_version_and_checksum
return if cask.sha256 == :no_check
return if @cask.sourcefile_path.nil?
tap = @cask.tap
@ -182,7 +184,8 @@ module Cask
def check_sha256_no_check_if_latest
odebug "Verifying sha256 :no_check with version :latest"
return unless cask.version.latest? && cask.sha256 != :no_check
return unless cask.version.latest?
return if cask.sha256 == :no_check
add_error "you should use sha256 :no_check when version is :latest"
end