summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-07-06 18:15:35 -0700
committerTim Smith <tsmith84@gmail.com>2020-07-20 11:45:27 -0700
commit317dc9c3e2f642bf4e3777fe0745137af9f54413 (patch)
treea0b6cde125f6154d4bbf808d3df4d144841ab511
parent79b1106ae862809c6d89643ff794a7ab5ad6ece3 (diff)
downloadchef-317dc9c3e2f642bf4e3777fe0745137af9f54413.tar.gz
If it's an array work it like an array
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/macos_userdefaults.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb
index c3f788f488..e2865b16af 100644
--- a/lib/chef/resource/macos_userdefaults.rb
+++ b/lib/chef/resource/macos_userdefaults.rb
@@ -136,8 +136,8 @@ class Chef
action_class do
def defaults_write_cmd
- cmd = ["defaults write '#{new_resource.domain}' '#{new_resource.key}' "]
- cmd.unshift("sudo") if new_resource.sudo
+ cmd = ["defaults", "write", new_resource.domain, new_resource.key]
+ cmd.prepend("sudo") if new_resource.sudo
value = new_resource.value
type = !new_resource.type.empty? ? new_resource.type : value_type(value)