diff options
author | rishichawda <rishichawda@users.noreply.github.com> | 2021-09-30 10:59:54 +0530 |
---|---|---|
committer | rishichawda <rishichawda@users.noreply.github.com> | 2021-09-30 15:08:12 +0530 |
commit | 858cc2258c6b0ad8add05c3dd011c986164b90e2 (patch) | |
tree | 147fd4fa19a2747975cf05f513983109c9ed24b4 | |
parent | 12aa62c8bc0f76d0c2aa291b81655f153127592c (diff) | |
download | chef-858cc2258c6b0ad8add05c3dd011c986164b90e2.tar.gz |
make the set call uniform
Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
-rw-r--r-- | lib/chef/resource/macos_userdefaults.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index ce253734b4..b0b9c32fe0 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -118,7 +118,7 @@ class Chef action :write, description: "Write the value to the specified domain/key." do converge_if_changed do Chef::Log.debug("Updating defaults value for #{new_resource.key} in #{new_resource.domain}") - set_preference(new_resource) + CF::Preferences.set!(new_resource.key, new_resource.value, new_resource.domain, new_resource.user, new_resource.host) end end @@ -136,10 +136,6 @@ class Chef CF::Preferences.get(new_resource.key, new_resource.domain, new_resource.user, new_resource.host) end - def set_preference(new_resource) - CF::Preferences.set!(new_resource.key, new_resource.value, new_resource.domain, new_resource.user, new_resource.host) - end - # Return valid hostname based on the input from host property def to_cf_host(value) case value |