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