Skip to content
Snippets Groups Projects
Commit aa435825 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #702 from MikeMcQuaid/silence-audit-revisions

Silence auditing formula revisions deprecations
parents 611ba62a e0c8c00e
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment