summaryrefslogtreecommitdiff
path: root/lib/chef/resource/macos_userdefaults.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-02-20 13:39:28 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2020-02-21 14:13:15 -0800
commit9b3cd8affcd5e73641f1135e5fc17ae89b50eec9 (patch)
tree435bfff68ab178a504b8b11e11c0b5b2f60a6551 /lib/chef/resource/macos_userdefaults.rb
parent04979a3ba5ca32e3c97ae492eae84829994697a0 (diff)
downloadchef-9b3cd8affcd5e73641f1135e5fc17ae89b50eec9.tar.gz
Convert more resources to unified_mode
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource/macos_userdefaults.rb')
-rw-r--r--lib/chef/resource/macos_userdefaults.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb
index 02d65baee4..4197f3a0a8 100644
--- a/lib/chef/resource/macos_userdefaults.rb
+++ b/lib/chef/resource/macos_userdefaults.rb
@@ -1,6 +1,6 @@
#
# Copyright:: 2011-2018, Joshua Timberman
-# Copyright:: 2018, Chef Software, Inc.
+# Copyright:: 2018-2020, Chef Software Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -20,6 +20,8 @@ require_relative "../resource"
class Chef
class Resource
class MacosUserDefaults < Chef::Resource
+ unified_mode true
+
# align with apple's marketing department
resource_name :macos_userdefaults
provides(:mac_os_x_userdefaults) { true }
@@ -106,7 +108,9 @@ class Chef
cmd << "-#{type}" if type
cmd << value
- declare_resource(:execute, cmd.join(" ")) do
+ # FIXME: this should use cmd directly as an array argument, but then the quoting
+ # of indiviual args above needs to be removed as well.
+ execute cmd.join(" ") do
user new_resource.user unless new_resource.user.nil?
end
end