Module: Homebrew::Diagnostic Private
- Defined in:
- Library/Homebrew/diagnostic.rb,
Library/Homebrew/extend/os/mac/diagnostic.rb,
Library/Homebrew/extend/os/linux/diagnostic.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Module containing diagnostic checks.
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.checks(type, fatal: true) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'Library/Homebrew/diagnostic.rb', line 32 def self.checks(type, fatal: true) @checks ||= Checks.new failed = false @checks.public_send(type).each do |check| out = @checks.public_send(check) next if out.nil? if fatal failed ||= true ofail out else opoo out end end exit 1 if failed && fatal end |
.missing_deps(ff, hide = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'Library/Homebrew/diagnostic.rb', line 20 def self.missing_deps(ff, hide = nil) missing = {} ff.each do |f| missing_dependencies = f.missing_dependencies(hide: hide) next if missing_dependencies.empty? yield f.full_name, missing_dependencies if block_given? missing[f.full_name] = missing_dependencies end missing end |