summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <454857+lamont-granquist@users.noreply.github.com>2022-01-13 18:44:50 -0800
committerGitHub <noreply@github.com>2022-01-13 18:44:50 -0800
commitf485049382e8426713b94abfc6e60747a14dd97e (patch)
tree8ce5e0f485b9a8d3189eb0ecc4fed743ee96418a
parent4c78dfb0cacbbe85222ac87a534670adc8d8baa6 (diff)
parentf3e1ecf2b32e045aee27a0fc30fdfcd90851a43d (diff)
downloadchef-f485049382e8426713b94abfc6e60747a14dd97e.tar.gz
Merge pull request #12443 from chef/macuser
-rw-r--r--lib/chef/provider/user/mac.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/user/mac.rb b/lib/chef/provider/user/mac.rb
index 8e5b3d1cf3..838dca7886 100644
--- a/lib/chef/provider/user/mac.rb
+++ b/lib/chef/provider/user/mac.rb
@@ -48,7 +48,7 @@ class Chef
if user_plist
current_resource.uid(user_plist[:uid][0])
current_resource.gid(user_plist[:gid][0])
- current_resource.home(user_plist[:home][0])
+ current_resource.home(user_plist[:home]&.first) # use &.first since home can be nil
current_resource.shell(user_plist[:shell]&.first) # use &.first since shell can be nil
current_resource.comment(user_plist[:comment][0])