lib/facter.rb
def error_check(resolved_facts)
      if Options[:strict]
        missing_names = resolved_facts.select { |fact| fact.type == :nil }.map(&:user_query)

        if missing_names.count.positive?
          status = 1
          log_errors(missing_names)
        else
          status = nil
        end
      end

      status
    end
# Returns exit status when user query contains facts that do
#   not exist
#
# @param dirs [Array] Arguments sent to CLI
# @param dirs [Array] List of resolved facts
#
# @return [Integer, nil] Will return status 1 if user query contains
#  facts that are not found or resolved, otherwise it will return nil
#
# @api private
Returns exit status when user query contains facts that do
not exist
Returns exit status when user query contains facts that do not exist
def error_check(resolved_facts)
      if Options[:strict]
        missing_names = resolved_facts.select { |fact| fact.type == :nil }.map(&:user_query)
        if missing_names.count.positive?
          status = 1
          log_errors(missing_names)
        else
          status = nil
        end
      end
      status
    end
def error_check ( resolved_facts ) if Options [ :strict ] missing_names = resolved_facts . select { | fact | fact . type == :nil } . map ( & :user_query ) if missing_names . count . positive? status = 1 log_errors ( missing_names ) else status = nil end end status end
Returns exit status when user query contains facts that do
not exist
Returns exit status when user query contains facts that do not exist
Will return status 1 if user query contains facts that are not found or resolved, otherwise it will return nil
Will return status 1 if user query contains facts that are not found or resolved otherwise it will return nil
Integer, nil
resolved_facts
dirs
List of resolved facts
List of resolved facts
api
None