diff options
| author | Mike McQuaid | 2016-08-14 10:00:13 +0100 |
|---|---|---|
| committer | GitHub | 2016-08-14 10:00:13 +0100 |
| commit | aa435825d2e918dfed48d85e6c0dcb98265ed2ba (patch) | |
| tree | 4d21edd34363f06e206aaa037ffa08a8a43afaf7 | |
| parent | 611ba62a24fa8a7aba02f580f25e05f1d3a386ea (diff) | |
| parent | e0c8c00e879410c6de6062c3de5319e6c073dd04 (diff) | |
| download | brew-aa435825d2e918dfed48d85e6c0dcb98265ed2ba.tar.bz2 | |
Merge pull request #702 from MikeMcQuaid/silence-audit-revisions
Silence auditing formula revisions deprecations
| -rw-r--r-- | Library/Homebrew/formula_versions.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/global.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/utils.rb | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/formula_versions.rb b/Library/Homebrew/formula_versions.rb index de285b642..13cb8ac8c 100644 --- a/Library/Homebrew/formula_versions.rb +++ b/Library/Homebrew/formula_versions.rb @@ -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 diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb index 9554dd536..f739f5012 100644 --- a/Library/Homebrew/global.rb +++ b/Library/Homebrew/global.rb @@ -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+)} diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 71f03c6d5..90469bca9 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -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" |
