aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/missing.rb
blob: 3d70e5f353e8acb33fe8ab89059eb6a61cfd6c1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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