diff options
| author | Shaun Jackman | 2017-09-28 11:36:56 -0700 |
|---|---|---|
| committer | Shaun Jackman | 2017-09-28 12:29:23 -0700 |
| commit | c19cc70ac8b87bfe93d2b94e5693584139238e23 (patch) | |
| tree | da93847c84a1bf39076d5a15d6cd6f13c84c9054 /Library/Homebrew | |
| parent | 2e77de3b58043cb8acc1e28070ae7e24fbf596fb (diff) | |
| download | brew-c19cc70ac8b87bfe93d2b94e5693584139238e23.tar.bz2 | |
FormulaInstaller: Warn when tap version is newer
Warn if a more recent version of this formula is available in the tap.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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? |
