summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-04-10 12:08:14 -0700
committerTim Smith <tsmith84@gmail.com>2020-04-10 12:08:14 -0700
commit3060db60b9b1f8239cb5df39de4217acfbfd6d58 (patch)
tree1aa64fd9f0f41d670e5785f6ac98ded9eb2eb05f
parent92ceb8d720d812ad657a1b9e2137baf5a2e838c5 (diff)
downloadchef-3060db60b9b1f8239cb5df39de4217acfbfd6d58.tar.gz
Use shell_out! instead of execute
This makes for much cleaner log output Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/plist.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/chef/resource/plist.rb b/lib/chef/resource/plist.rb
index d4d6167428..220cfc7a1f 100644
--- a/lib/chef/resource/plist.rb
+++ b/lib/chef/resource/plist.rb
@@ -67,17 +67,13 @@ class Chef
converge_if_changed :entry do
converge_by "add entry \"#{new_resource.entry}\" to #{plist_file_name}" do
- execute plistbuddy_command(:add, new_resource.entry, new_resource.path, new_resource.value) do
- action :run
- end
+ shell_out!(plistbuddy_command(:add, new_resource.entry, new_resource.path, new_resource.value))
end
end
converge_if_changed :value do
converge_by "#{plist_file_name}: set #{new_resource.entry} to #{new_resource.value}" do
- execute plistbuddy_command(:set, new_resource.entry, new_resource.path, new_resource.value) do
- action :run
- end
+ shell_out!(plistbuddy_command(:set, new_resource.entry, new_resource.path, new_resource.value))
end
end
@@ -88,9 +84,7 @@ class Chef
"Option encoding must be equal to one of: #{plutil_format_map.keys}! You passed \"#{new_resource.encoding}\"."
)
end
- execute [plutil_executable, "-convert", plutil_format_map[new_resource.encoding], new_resource.path] do
- action :run
- end
+ shell_out!(plutil_executable, "-convert", plutil_format_map[new_resource.encoding], new_resource.path)
end
end