cask/dsl: set no_autobump! if livecheck uses :extract_plist

Signed-off-by: botantony <antonsm21@gmail.com>
This commit is contained in:
botantony 2025-05-21 23:23:29 +02:00
parent 4887d58826
commit ac2d167ffc
No known key found for this signature in database
GPG Key ID: 7FE721557EA6AAD6

View File

@ -161,8 +161,6 @@ module Cask
@token = T.let(cask.token, String) @token = T.let(cask.token, String)
@url = T.let(nil, T.nilable(URL)) @url = T.let(nil, T.nilable(URL))
@version = T.let(nil, T.nilable(DSL::Version)) @version = T.let(nil, T.nilable(DSL::Version))
set_no_autobump!
end end
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
@ -177,13 +175,6 @@ module Cask
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
def livecheck_defined? = @livecheck_defined def livecheck_defined? = @livecheck_defined
sig { void }
def set_no_autobump!
return if @livecheck.strategy != :extract_plist
no_autobump! because: :extract_plist
end
sig { returns(T::Boolean) } sig { returns(T::Boolean) }
def on_system_blocks_exist? = @on_system_blocks_exist def on_system_blocks_exist? = @on_system_blocks_exist
@ -547,6 +538,8 @@ module Cask
@livecheck_defined = true @livecheck_defined = true
@livecheck.instance_eval(&block) @livecheck.instance_eval(&block)
no_autobump! because: :extract_plist if @livecheck.strategy == :extract_plist
@livecheck
end end
# Whether the cask contains a `livecheck` block. This is a legacy alias # Whether the cask contains a `livecheck` block. This is a legacy alias