Merge pull request #702 from MikeMcQuaid/silence-audit-revisions
Silence auditing formula revisions deprecations
This commit is contained in:
commit
aa435825d2
@ -34,6 +34,7 @@ class FormulaVersions
|
||||
contents = file_contents_at_revision(rev)
|
||||
|
||||
begin
|
||||
Homebrew.raise_deprecation_exceptions = true
|
||||
nostdout { yield Formulary.from_contents(name, path, contents) }
|
||||
rescue *IGNORED_EXCEPTIONS => e
|
||||
# We rescue these so that we can skip bad versions and
|
||||
@ -41,6 +42,8 @@ class FormulaVersions
|
||||
ohai "#{e} in #{name} at revision #{rev}", e.backtrace if ARGV.debug?
|
||||
rescue FormulaUnavailableError
|
||||
# Suppress this error
|
||||
ensure
|
||||
Homebrew.raise_deprecation_exceptions = false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -51,6 +51,9 @@ module Homebrew
|
||||
|
||||
attr_accessor :failed
|
||||
alias_method :failed?, :failed
|
||||
|
||||
attr_accessor :raise_deprecation_exceptions
|
||||
alias_method :raise_deprecation_exceptions?, :raise_deprecation_exceptions
|
||||
end
|
||||
|
||||
HOMEBREW_PULL_API_REGEX = %r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}
|
||||
|
||||
@ -151,7 +151,8 @@ def odeprecated(method, replacement = nil, options = {})
|
||||
#{caller_message}#{tap_message}
|
||||
EOS
|
||||
|
||||
if ARGV.homebrew_developer? || options[:die]
|
||||
if ARGV.homebrew_developer? || options[:die] ||
|
||||
Homebrew.raise_deprecation_exceptions?
|
||||
raise FormulaMethodDeprecatedError, message
|
||||
else
|
||||
opoo "#{message}\n"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user