From 9b3cd8affcd5e73641f1135e5fc17ae89b50eec9 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 20 Feb 2020 13:39:28 -0800 Subject: Convert more resources to unified_mode Signed-off-by: Lamont Granquist --- lib/chef/resource/macos_userdefaults.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/chef/resource/macos_userdefaults.rb') 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 -- cgit v1.2.1