From c19cc70ac8b87bfe93d2b94e5693584139238e23 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Thu, 28 Sep 2017 11:36:56 -0700 Subject: FormulaInstaller: Warn when tap version is newer Warn if a more recent version of this formula is available in the tap. --- Library/Homebrew/formula_installer.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index ea4415796..845152e24 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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? -- cgit v1.2.3