aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorMike McQuaid2018-01-21 13:34:36 +0000
committerMike McQuaid2018-01-21 13:34:36 +0000
commit5e5989b70422d761bd4b3dbba949a33de3502554 (patch)
treea65fca48e0d14f09bc1182cee61372b91423dc4d /Library/Homebrew/utils.rb
parentd14fd49b3062ab1d95e86b78a8228c8aee3a3304 (diff)
downloadbrew-5e5989b70422d761bd4b3dbba949a33de3502554.tar.bz2
utils: no deprecations for cached formulae.
`HOMEBREW_CACHE`d and `.brew`ed formulae cannot be updated so don't complain about their deprecation.
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index a1fb0d235..f8990e7ec 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -89,6 +89,9 @@ def odeprecated(method, replacement = nil, disable: false, disable_on: nil, call
true
end
caller_message ||= backtrace.detect do |line|
+ # Don't throw deprecations at all for cached or .brew formulae.
+ next false if line.include?(HOMEBREW_CACHE)
+ next false if line.include?("/.brew/")
!line.start_with?("#{HOMEBREW_LIBRARY_PATH}/compat/")
end
caller_message ||= backtrace[1]