diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-07-06 17:04:03 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-07-20 11:45:27 -0700 |
commit | 8ae5fdd0d7cf61665c2515a1dd3b130a4b0c08bc (patch) | |
tree | 381d0526f256bd3cb78dc1952e6be16d2e9fe7ee /lib | |
parent | 5edfd2e361ab73a26b08d39885a748f5c858f909 (diff) | |
download | chef-8ae5fdd0d7cf61665c2515a1dd3b130a4b0c08bc.tar.gz |
updates
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/resource/macos_userdefaults.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index 8d2c5a4647..d7a6234559 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -16,6 +16,7 @@ # require_relative "../resource" +require 'shellwords' class Chef class Resource @@ -112,10 +113,10 @@ class Chef state_cmd = ['/usr/bin/defaults', 'read', desired.domain, desired.key] state = if desired.user.nil? - shell_out(state_cmd) - else - shell_out(cmd, user: desired.user) - end + shell_out(state_cmd) + else + shell_out(cmd, user: desired.user) + end current_value_does_not_exist! if state.error? |