FormulaInstaller: Warn when tap version is newer

Warn if a more recent version of this formula is available in the tap.
This commit is contained in:
Shaun Jackman 2017-09-28 11:36:56 -07:00
parent 2e77de3b58
commit c19cc70ac8

View File

@ -235,6 +235,15 @@ class FormulaInstaller
raise CannotInstallFormulaError, message
end
# Warn if a more recent version of this formula is available in the tap.
begin
if formula.pkg_version < (v = Formulary.factory(formula.full_name).pkg_version)
opoo "#{formula.full_name} #{v} is available and more recent than version #{formula.pkg_version}."
end
rescue FormulaUnavailableError
nil
end
check_conflicts
if !pour_bottle? && !formula.bottle_unneeded? && !DevelopmentTools.installed?