summaryrefslogtreecommitdiff
path: root/lib/chef/resource/ohai_hint.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/ohai_hint.rb')
-rw-r--r--lib/chef/resource/ohai_hint.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/resource/ohai_hint.rb b/lib/chef/resource/ohai_hint.rb
index c11ef78950..30d7a3bd0c 100644
--- a/lib/chef/resource/ohai_hint.rb
+++ b/lib/chef/resource/ohai_hint.rb
@@ -79,6 +79,7 @@ class Chef
# @return [JSON] json representation of the content of an empty string if content was nil
def format_content(content)
return "" if content.nil? || content.empty?
+
JSON.pretty_generate(content)
end
end
@@ -88,6 +89,7 @@ class Chef
# @return [void]
def after_created
return unless compile_time
+
Array(action).each do |action|
run_action(action)
end