odeprecated: handle deprecated and disabled formulae.
It's not useful to spend time complaining about or fixing deprecations or disables in deprecated or disabled formulae given we already complain on install and don't run them through CI.
This commit is contained in:
parent
eab2ba852a
commit
4bb8becf60
@ -188,9 +188,18 @@ module Kernel
|
||||
|
||||
# Don't throw deprecations at all for cached, .brew or .metadata files.
|
||||
return if backtrace.any? do |line|
|
||||
line.include?(HOMEBREW_CACHE) ||
|
||||
line.include?("/.brew/") ||
|
||||
line.include?("/.metadata/")
|
||||
next true if line.include?(HOMEBREW_CACHE)
|
||||
next true if line.include?("/.brew/")
|
||||
next true if line.include?("/.metadata/")
|
||||
|
||||
next false unless line.match?(HOMEBREW_TAP_PATH_REGEX)
|
||||
|
||||
path = Pathname(line.split(":", 2).first)
|
||||
next false unless path.file?
|
||||
next false unless path.readable?
|
||||
|
||||
formula_contents = path.read
|
||||
formula_contents.include?(" deprecate! ") || formula_contents.include?(" disable! ")
|
||||
end
|
||||
|
||||
tap_message = T.let(nil, T.nilable(String))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user