Merge pull request #9542 from MikeMcQuaid/odeprecated-deprecate-disable
odeprecated: handle deprecated and disabled formulae.
This commit is contained in:
commit
34b9fe1338
@ -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