diff options
author | rishichawda <rishichawda@users.noreply.github.com> | 2021-08-04 19:11:30 +0530 |
---|---|---|
committer | rishichawda <rishichawda@users.noreply.github.com> | 2021-09-24 16:44:13 +0530 |
commit | f1763c759c2a3378f21a2dee6063b5ae6efed193 (patch) | |
tree | 1f6636f197342d053836ad8cab9937b6f4b3e677 | |
parent | 55949caca1259559586fb7d9ffd57155fb27bb9e (diff) | |
download | chef-f1763c759c2a3378f21a2dee6063b5ae6efed193.tar.gz |
fix(macos_userdefaults): silent fail on set call
Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
-rw-r--r-- | lib/chef/resource/macos_userdefaults.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index 668902988c..d23d384a24 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -129,7 +129,7 @@ class Chef Chef::Log.debug("Removing defaults key: #{new_resource.key}") user = to_cf_user new_resource.user host = to_cf_host new_resource.host - CF::Preferences.set(new_resource.key, nil, new_resource.domain, user, host) + CF::Preferences.set!(new_resource.key, nil, new_resource.domain, user, host) end end @@ -142,7 +142,7 @@ class Chef def set_preference(new_resource) user = to_cf_user new_resource.user host = to_cf_host new_resource.host - CF::Preferences.set(new_resource.key, new_resource.value, new_resource.domain, user, host) + CF::Preferences.set!(new_resource.key, new_resource.value, new_resource.domain, user, host) end # Return valid hostname based on the input from host property |