brew/Library/Homebrew/cmd/missing.rb
Baptiste Fontaine 9f1442db14 doctor: move code away from cmd/
Closes Homebrew/homebrew#47665.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-05 14:33:06 +01:00

21 lines
365 B
Ruby

require "formula"
require "tab"
require "diagnostic"
module Homebrew
def missing
return unless HOMEBREW_CELLAR.exist?
ff = if ARGV.named.empty?
Formula.installed
else
ARGV.resolved_formulae
end
Diagnostic.missing_deps(ff) do |name, missing|
print "#{name}: " if ff.size > 1
puts "#{missing * " "}"
end
end
end