blob: 891846cb8d6903fec0259ebb1c9ecf22bc9e73f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#: * `missing` [`--hide=`<hidden>] [<formulae>]:
#: Check the given <formulae> for missing dependencies. If no <formulae> are
#: given, check all installed brews.
#:
#: If `--hide=`<hidden> is passed, act as if none of <hidden> are installed.
#: <hidden> should be a comma-seperated list of formulae.
require "formula"
require "tab"
require "diagnostic"
module Homebrew
module_function
def missing
return unless HOMEBREW_CELLAR.exist?
ff = if ARGV.named.empty?
Formula.installed
else
ARGV.resolved_formulae
end
ff.each do |f|
missing = f.missing_dependencies(hide: ARGV.values("hide"))
next if missing.empty?
print "#{f}: " if ff.size > 1
puts missing.join(" ")
end
end
end
|