summaryrefslogtreecommitdiff
path: root/lib/chef/formatters/doc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/formatters/doc.rb')
-rw-r--r--lib/chef/formatters/doc.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb
index 77deff5b66..43498cba1a 100644
--- a/lib/chef/formatters/doc.rb
+++ b/lib/chef/formatters/doc.rb
@@ -306,6 +306,7 @@ class Chef
prefix = Chef::Config[:why_run] ? "Would " : ""
Array(update).each do |line|
next if line.nil?
+
output_record line
if line.kind_of? String
start_line "- #{prefix}#{line}", :green
@@ -358,6 +359,7 @@ class Chef
# in whyrun mode, in order to allow execution to continue
def whyrun_assumption(action, resource, message)
return unless message
+
[ message ].flatten.each do |line|
start_line("* #{line}", :yellow)
end
@@ -366,6 +368,7 @@ class Chef
# Called when an assertion declared by a provider fails
def provider_requirement_failed(action, resource, exception, message)
return unless message
+
color = Chef::Config[:why_run] ? :yellow : :red
[ message ].flatten.each do |line|
start_line("* #{line}", color)