aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-08-27 22:08:13 -0500
committerJack Nagel2012-08-30 20:39:46 -0500
commitf7b4ce056e9df713e087b0cd15ce09af4793285a (patch)
tree24935473e5d69ea3c6c9893bfec3f71a8b2bacf3 /Library
parent16d6406b8d5c530ab90364a5eca55823bb98b553 (diff)
downloadhomebrew-f7b4ce056e9df713e087b0cd15ce09af4793285a.tar.bz2
Simplify `brew outdated` even further
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/outdated.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb
index 5f655b3a4..f8780f57a 100644
--- a/Library/Homebrew/cmd/outdated.rb
+++ b/Library/Homebrew/cmd/outdated.rb
@@ -5,7 +5,7 @@ module Homebrew extend self
def outdated
outdated_brews do |f|
if $stdout.tty? and not ARGV.flag? '--quiet'
- versions = f.rack.subdirs.map { |d| Keg.new(d) }.map { |keg| keg.basename }
+ versions = f.rack.subdirs.map { |d| Keg.new(d).version }
puts "#{f.name} (#{versions*', '} < #{f.version})"
else
puts f.name
@@ -14,11 +14,8 @@ module Homebrew extend self
end
def outdated_brews
- HOMEBREW_CELLAR.subdirs.reject { |d| d.subdirs.empty? }.map do |rack|
- f = Formula.factory(rack.basename.to_s) rescue nil
- next if f.nil?
-
- kegs = rack.subdirs.map { |d| Keg.new(d) }
+ Formula.installed.map do |f|
+ kegs = f.rack.subdirs.map { |d| Keg.new(d) }
unless kegs.any? { |keg| keg.version >= f.version }
yield f if block_given?
f