diff options
author | Tim Smith <tsmith@chef.io> | 2018-03-29 14:19:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-29 14:19:27 -0700 |
commit | f841694ed7e35a91d83714ea6050e57265e3b20c (patch) | |
tree | 6ce66ce1b0195c6ed4b2e2e7bfc5095309e5f5b2 | |
parent | e14206b251b331cfadb326ed1f28f500f7095c89 (diff) | |
parent | 044646140067c761a4885e4d025ca3f31c6b2b0b (diff) | |
download | chef-f841694ed7e35a91d83714ea6050e57265e3b20c.tar.gz |
Merge pull request #7095 from chef/userdefaults
macos_userdefaults: Fix 2 failures
-rw-r--r-- | lib/chef/resource/macos_userdefaults.rb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index abdf08c1d4..95e9a5e7b4 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -84,7 +84,7 @@ class Chef action :write do description "Write the setting to the specified domain" - unless current_value.is_set + unless current_resource.is_set cmd = ["defaults write"] cmd.unshift("sudo") if new_resource.sudo @@ -111,6 +111,23 @@ class Chef end end end + + action_class do + def value_type(value) + case value + when true, false + "bool" + when Integer + "int" + when Float + "float" + when Hash + "dict" + when Array + "array" + end + end + end end end end |