brew/Library/Homebrew/cmd/missing.rb

25 lines
518 B
Ruby
Raw Normal View History

2016-04-08 16:28:43 +02:00
#: * `missing` [<formulae>]:
#: Check the given <formulae> for missing dependencies. If no <formulae> are
#: given, check all installed brews.
2016-04-08 16:28:43 +02:00
require "formula"
require "tab"
require "diagnostic"
module Homebrew
def missing
return unless HOMEBREW_CELLAR.exist?
ff = if ARGV.named.empty?
Formula.installed
else
2015-05-17 21:02:54 +08:00
ARGV.resolved_formulae
end
Diagnostic.missing_deps(ff) do |name, missing|
print "#{name}: " if ff.size > 1
2016-09-10 10:24:57 +01:00
puts (missing * " ").to_s
end
end
end