Skip to content
Snippets Groups Projects
Commit 7fa4ffe3 authored by ilovezfs's avatar ilovezfs Committed by Alyssa Ross
Browse files

missing: allow hiding specified formulae

parent ed0fffd9
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ module Homebrew
ARGV.resolved_formulae
end
Diagnostic.missing_deps(ff) do |name, missing|
Diagnostic.missing_deps(ff, ARGV.value("hide")) do |name, missing|
print "#{name}: " if ff.size > 1
puts missing.join(" ")
end
......
......@@ -7,7 +7,7 @@ require "utils/shell"
module Homebrew
module Diagnostic
def self.missing_deps(ff)
def self.missing_deps(ff, hide = nil)
missing = {}
ff.each do |f|
missing_deps = f.recursive_dependencies do |dependent, dep|
......@@ -20,7 +20,13 @@ module Homebrew
end
missing_deps.map!(&:to_formula)
missing_deps.reject! { |d| d.installed_prefixes.any? }
if hide
missing_deps.reject! do |d|
!hide.include?(d.name) && d.installed_prefixes.any?
end
else
missing_deps.reject! { |d| d.installed_prefixes.any? }
end
unless missing_deps.empty?
yield f.full_name, missing_deps if block_given?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment