diff options
| author | Jack Nagel | 2012-03-01 18:02:36 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-03-01 18:04:41 -0600 |
| commit | d9fdd401da4409cb33b0f336ae1293af830fea7c (patch) | |
| tree | 53dd92fa52fbf0cd18eee0ed5bd82ddfdf6d79ac /Library | |
| parent | e0eb98c84c688ecbca0da1dd89ac7e569a83534b (diff) | |
| download | brew-d9fdd401da4409cb33b0f336ae1293af830fea7c.tar.bz2 | |
missing: adjust to new ARGV.formulae behavior
Since 25aefdd ("don't complain if args are empty"), ARGV.formulae does
not raise an exception; `brew missing` was relying on that to determine
what set of formulae to act on. Fix this, and also a typo.
Fixes Homebrew/homebrew#10617.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/examples/brew-missing.rb | 10 |
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 |
