aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xLibrary/Contributions/examples/brew-missing.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Contributions/examples/brew-missing.rb b/Library/Contributions/examples/brew-missing.rb
index 21a0c071e..b3f287541 100755
--- a/Library/Contributions/examples/brew-missing.rb
+++ b/Library/Contributions/examples/brew-missing.rb
@@ -16,15 +16,19 @@ def main
# Names of outdated brews; they count as installed.
outdated = Homebrew.outdated_brews.collect{ |b| b.name }
- formuale_to_check = ARGV.formulae rescue installed_brews
+ formulae_to_check = if ARGV.named.empty?
+ installed_brews
+ else
+ ARGV.formulae
+ end
- formuale_to_check.each do |f|
+ formulae_to_check.each do |f|
missing_deps = f.recursive_deps.map{ |g| g.name }.uniq.reject do |dep_name|
Formula.factory(dep_name).installed? or outdated.include?(dep_name)
end
unless missing_deps.empty?
- print "#{f.name}: " if formuale_to_check.size > 1
+ print "#{f.name}: " if formulae_to_check.size > 1
puts "#{missing_deps * ', '}"
end
end