aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2012-08-18 18:37:32 -0500
committerJack Nagel2012-08-18 19:33:39 -0500
commitc6b3cd7cf454d542f0d713472a4cea73746d57a2 (patch)
treec8a670acc703f767587ff37ed2389c9b68544745 /Library/Homebrew/cmd
parent93f7a0fa85a7dc61af8633747cff734dfffecb98 (diff)
downloadbrew-c6b3cd7cf454d542f0d713472a4cea73746d57a2.tar.bz2
Don't lie about upgrading up-to-date formulae
Usually, the "foo-version already installed" error is printed by FormulaInstaller. However, if an up-to-date formula that has outdated deps is passed on the command line, we proceed to upgrade the deps and then print a message saying that the formulae given on the command line is already installed. Catch this earlier, when the outdated list is being populated, print an appropriate message, and skip the up-to-date formula. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/upgrade.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index 1afef1261..7ec02a0b5 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -21,7 +21,9 @@ module Homebrew extend self
Homebrew.outdated_brews
else
ARGV.formulae.select do |f|
- unless f.rack.exist? and not f.rack.children.empty?
+ if f.installed?
+ onoe "#{f}-#{f.installed_version} already installed"
+ elsif not f.rack.exist? or f.rack.children.empty?
onoe "#{f} not installed"
else
true