lib/puppet_litmus/rake_helper.rb
# Parse out errors messages in result set returned by Bolt command. If there are errors, raise them.
#
# @param result_set [Array] result set returned by Bolt command.
# @param error_msg [String] error message to raise when errors are detected. The actual errors will be appended.
Parse out errors messages in result set returned by Bolt command. If there are errors, raise them.
Parse out errors messages in result set returned by Bolt command . If there are errors raise them .
def raise_bolt_errors(result_set, error_msg)
    errors = check_bolt_errors(result_set)
    unless errors.empty?
      formatted_results = errors.map { |k, v| "  #{k}: #{v.inspect}" }.join("\n")
      raise "#{error_msg}\nResults:\n#{formatted_results}}"
    end
    nil
  end
def raise_bolt_errors ( result_set , error_msg ) errors = check_bolt_errors ( result_set ) unless errors . empty? formatted_results = errors . map { | k , v | "  #{k}: #{v.inspect}" } . join ( "\n" ) raise "#{error_msg}\nResults:\n#{formatted_results}}" end nil end
Parse out errors messages in result set returned by Bolt command.
Parse out errors messages in result set returned by Bolt command .
result_set
result set returned by Bolt command.
result set returned by Bolt command .
error_msg
error message to raise when errors are detected. The actual errors will be appended.
error message to raise when errors are detected . The actual errors will be appended .