Skip to content
Snippets Groups Projects
Commit 245838d8 authored by Andrew Janke's avatar Andrew Janke
Browse files

info: print requirements

parent 8e9a9b64
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ module Homebrew
end
else
ARGV.named.each_with_index do |f, i|
puts unless i.zero?
puts unless i == 0
begin
if f.include?("/") || File.exist?(f)
info_formula Formulary.factory(f)
......@@ -146,6 +146,14 @@ module Homebrew
end
end
unless f.requirements.to_a.empty?
ohai "Requirements"
%w[build required recommended optional].map do |type|
reqs = f.requirements.select(&:"#{type}?")
puts "#{type.capitalize}: #{decorate_requirements(reqs)}" unless reqs.to_a.empty?
end
end
unless f.options.empty?
ohai "Options"
Homebrew.dump_options_for_formula f
......@@ -161,4 +169,11 @@ module Homebrew
end
deps_status * ", "
end
def decorate_requirements(requirements)
req_status = requirements.collect do |req|
req.satisfied? ? pretty_installed(req.name) : pretty_uninstalled(req.name)
end
req_status * ", "
end
end
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