summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Zaval <jazava@microsoft.com>2022-03-09 13:48:45 -0800
committerJacob Zaval <jazava@microsoft.com>2022-03-09 13:48:45 -0800
commitc1d4bd1028be7c936b092239e593a93e2ffd7ded (patch)
tree23f6e5a5a72c35ec6e084fbe24f692885baf4e2f
parent3f35e622fd9fc612bff3e5403e737f012aa9bd66 (diff)
downloadchef-c1d4bd1028be7c936b092239e593a93e2ffd7ded.tar.gz
assign empty plist before passing to file content property
Signed-off-by: Jacob Zaval <jazava@microsoft.com>
-rw-r--r--lib/chef/resource/plist.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/plist.rb b/lib/chef/resource/plist.rb
index 4a43605607..2d808452cd 100644
--- a/lib/chef/resource/plist.rb
+++ b/lib/chef/resource/plist.rb
@@ -85,7 +85,8 @@ class Chef
converge_if_changed :path do
converge_by "create new plist: '#{new_resource.path}'" do
file new_resource.path do
- content {}.to_plist
+ empty_plist = {}.to_plist
+ content empty_plist
owner new_resource.owner
group new_resource.group
mode new_resource.mode if property_is_set?(:mode)