diagnostic: complain on deprecated/disabled formulae.

This commit is contained in:
Mike McQuaid 2020-04-01 13:43:15 +01:00
parent c4c0e45aba
commit 7df1dd7797
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -640,6 +640,20 @@ module Homebrew
EOS
end
def check_deprecated_disabled
return unless HOMEBREW_CELLAR.exist?
deprecated_or_disabled = Formula.installed.select(&:deprecated?)
deprecated_or_disabled += Formula.installed.select(&:disabled?)
return if deprecated_or_disabled.empty?
<<~EOS
Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
#{deprecated_or_disabled.sort_by(&:full_name).uniq * "\n "}
EOS
end
def check_git_status
return unless Utils.git_available?