diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-07-17 23:15:08 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-07-20 11:45:27 -0700 |
commit | 1d1e0ef6e16837e7106ff1f7e9c5dfbd6fe26750 (patch) | |
tree | 4137694c4ea2cfe70383188008b1c467f4bce3de /lib | |
parent | 54abeb9cc238998d70d93429b79aebde9d8f2da4 (diff) | |
download | chef-1d1e0ef6e16837e7106ff1f7e9c5dfbd6fe26750.tar.gz |
Fix a few failures
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/resource/macos_userdefaults.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index d116393f65..abf99c147f 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -114,7 +114,7 @@ class Chef current_value_does_not_exist! end - value ::Plist.parse_xml(state.stdout) + value ::Plist.parse_xml(state.stdout)[key] end # @@ -190,11 +190,12 @@ class Chef # @return [array] array of values starting with the type if applicable # def processed_value - type = new_resource.type || value_type(value) + type = new_resource.type || value_type(new_resource.value) # when dict this creates an array of values ["Key1", "Value1", "Key2", "Value2" ...] cmd_vals = [ type == "dict" ? new_resource.value.flatten : new_resource.value ] cmd_vals.prepend("-#{type}") if type + cmd_vals end # |