diff options
author | Joseph Chilcote <chilcote+github@gmail.com> | 2020-01-25 16:36:23 -0800 |
---|---|---|
committer | Joseph Chilcote <chilcote+github@gmail.com> | 2020-01-25 16:36:23 -0800 |
commit | 9f3b604b1c205915474b31db58230d7712f96470 (patch) | |
tree | f53e10be305b91f8e22163341d5c1146e3a634ef /lib/chef/provider | |
parent | fc7626547569a368ae3d53e3917467e8b04f3555 (diff) | |
download | chef-9f3b604b1c205915474b31db58230d7712f96470.tar.gz |
Account for if the propery is not being set in the resource, and also if it doesn't exist in the user record
Signed-off-by: Joseph Chilcote <chilcote@fb.com>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/user/mac.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/provider/user/mac.rb b/lib/chef/provider/user/mac.rb index a8c97ef040..c570399ca3 100644 --- a/lib/chef/provider/user/mac.rb +++ b/lib/chef/provider/user/mac.rb @@ -51,7 +51,10 @@ class Chef current_resource.home(user_plist[:home][0]) current_resource.shell(user_plist[:shell][0]) current_resource.comment(user_plist[:comment][0]) - current_resource.hidden(user_plist[:is_hidden][0] == "1" ? true : false) + + if user_plist[:is_hidden] + current_resource.hidden(user_plist[:is_hidden][0] == "1" ? true : false) + end shadow_hash = user_plist[:shadow_hash] if shadow_hash |