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)
|
contents = file_contents_at_revision(rev)
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Homebrew.raise_deprecation_exceptions = true
|
||||||
nostdout { yield Formulary.from_contents(name, path, contents) }
|
nostdout { yield Formulary.from_contents(name, path, contents) }
|
||||||
rescue *IGNORED_EXCEPTIONS => e
|
rescue *IGNORED_EXCEPTIONS => e
|
||||||
# We rescue these so that we can skip bad versions and
|
# 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?
|
ohai "#{e} in #{name} at revision #{rev}", e.backtrace if ARGV.debug?
|
||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
# Suppress this error
|
# Suppress this error
|
||||||
|
ensure
|
||||||
|
Homebrew.raise_deprecation_exceptions = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,9 @@ module Homebrew
|
|||||||
|
|
||||||
attr_accessor :failed
|
attr_accessor :failed
|
||||||
alias_method :failed?, :failed
|
alias_method :failed?, :failed
|
||||||
|
|
||||||
|
attr_accessor :raise_deprecation_exceptions
|
||||||
|
alias_method :raise_deprecation_exceptions?, :raise_deprecation_exceptions
|
||||||
end
|
end
|
||||||
|
|
||||||
HOMEBREW_PULL_API_REGEX = %r{https://api\.github\.com/repos/([\w-]+)/([\w-]+)?/pulls/(\d+)}
|
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}
|
#{caller_message}#{tap_message}
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
if ARGV.homebrew_developer? || options[:die]
|
if ARGV.homebrew_developer? || options[:die] ||
|
||||||
|
Homebrew.raise_deprecation_exceptions?
|
||||||
raise FormulaMethodDeprecatedError, message
|
raise FormulaMethodDeprecatedError, message
|
||||||
else
|
else
|
||||||
opoo "#{message}\n"
|
opoo "#{message}\n"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user