From 5e5989b70422d761bd4b3dbba949a33de3502554 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 21 Jan 2018 13:34:36 +0000 Subject: utils: no deprecations for cached formulae. `HOMEBREW_CACHE`d and `.brew`ed formulae cannot be updated so don't complain about their deprecation. --- Library/Homebrew/utils.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Library') 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] -- cgit v1.2.3