Merge pull request #14834 from reitermarkus/livecheck-skip-latest

Allow `version :latest` if `livecheck` is `skip`.
This commit is contained in:
Mike McQuaid 2023-02-28 11:59:29 +00:00 committed by GitHub
commit 4cbc4f64d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -307,7 +307,11 @@ module Cask
return unless cask.version.latest? return unless cask.version.latest?
add_error "Casks with an `appcast` should not use `version :latest`." if cask.appcast add_error "Casks with an `appcast` should not use `version :latest`." if cask.appcast
add_error "Casks with a `livecheck` should not use `version :latest`." if cask.livecheckable?
return unless cask.livecheckable?
return if cask.livecheck.skip?
add_error "Casks with a `livecheck` should not use `version :latest`."
end end
sig { void } sig { void }