mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #19812 from Homebrew/cask-auditor-fix-language_blocks
Cask::Auditor: update language_blocks condition
This commit is contained in:
commit
b711ecc26b
@ -74,7 +74,7 @@ module Cask
|
||||
def audit
|
||||
errors = Set.new
|
||||
|
||||
if !language && (blocks = language_blocks)
|
||||
if !language && !(blocks = language_blocks).empty?
|
||||
sample_languages = if blocks.length > LANGUAGE_BLOCK_LIMIT && !@audit_new_cask
|
||||
sample_keys = T.must(blocks.keys.sample(LANGUAGE_BLOCK_LIMIT))
|
||||
ohai "Auditing a sample of available languages for #{cask}: " \
|
||||
@ -140,7 +140,7 @@ module Cask
|
||||
audit.run!
|
||||
end
|
||||
|
||||
sig { returns(T.nilable(T::Hash[T::Array[String], T.proc.returns(T.untyped)])) }
|
||||
sig { returns(T::Hash[T::Array[String], T.proc.returns(T.untyped)]) }
|
||||
def language_blocks
|
||||
cask.instance_variable_get(:@dsl).instance_variable_get(:@language_blocks)
|
||||
end
|
||||
|
@ -149,7 +149,6 @@ module Cask
|
||||
@name = T.let([], T::Array[String])
|
||||
@on_system_blocks_exist = T.let(false, T::Boolean)
|
||||
@os = T.let(nil, T.nilable(String))
|
||||
@token = cask.token
|
||||
@on_system_block_min_os = T.let(nil, T.nilable(MacOSVersion))
|
||||
@sha256 = T.let(nil, T.nilable(T.any(Checksum, Symbol)))
|
||||
@staged_path = T.let(nil, T.nilable(Pathname))
|
||||
|
Loading…
x
Reference in New Issue
Block a user