aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions/cmds
diff options
context:
space:
mode:
authorAdam Vandenberg2012-06-11 12:57:51 -0700
committerAdam Vandenberg2012-06-12 20:03:26 -0700
commitec4b34aa082d9e1eaa54b8a890da924674e9ee0e (patch)
treea458d933994a9c25bcef577a49cfce3dcab2aefa /Library/Contributions/cmds
parent644af3696b66b282259b8c952e9f4d927c8314b9 (diff)
downloadbrew-ec4b34aa082d9e1eaa54b8a890da924674e9ee0e.tar.bz2
Fix doctor's use of missing.
`brew doctor` shelled to `brew missing` and parsed the results. When VERBOSE was true, this caused an error as extra, unexpected output is generated. Make missing an internal command, and give it a programmatic interface.
Diffstat (limited to 'Library/Contributions/cmds')
-rwxr-xr-xLibrary/Contributions/cmds/brew-missing.rb37
1 files changed, 0 insertions, 37 deletions
diff --git a/Library/Contributions/cmds/brew-missing.rb b/Library/Contributions/cmds/brew-missing.rb
deleted file mode 100755
index 50fae12e4..000000000
--- a/Library/Contributions/cmds/brew-missing.rb
+++ /dev/null
@@ -1,37 +0,0 @@
-require "formula"
-require "cmd/outdated"
-
-def installed_brews
- formulae = []
- HOMEBREW_CELLAR.subdirs.each do |rack|
- f = Formula.factory rack.basename.to_s rescue nil
- formulae << f if f and f.installed?
- end
- formulae
-end
-
-def main
- return unless HOMEBREW_CELLAR.exist?
-
- # Names of outdated brews; they count as installed.
- outdated = Homebrew.outdated_brews.collect{ |b| b.name }
-
- formulae_to_check = if ARGV.named.empty?
- installed_brews
- else
- ARGV.formulae
- end
-
- 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 formulae_to_check.size > 1
- puts "#{missing_deps * ' '}"
- end
- end
-end
-
-main()