utils: check for tap_message in odeprecated.

`tap` is not a method-wide variable.

Fixes #3907
This commit is contained in:
Mike McQuaid 2018-03-11 16:55:06 +00:00
parent 04efbadb9e
commit 5e161252c9

View File

@ -109,7 +109,7 @@ def odeprecated(method, replacement = nil, disable: false, disable_on: nil, call
if ARGV.homebrew_developer? || disable ||
Homebrew.raise_deprecation_exceptions?
if replacement || tap
if replacement || tap_message
developer_message = message + "Or, even better, submit a PR to fix it!"
end
raise MethodDeprecatedError, developer_message