summaryrefslogtreecommitdiff
path: root/lib/chef/provider/user
diff options
context:
space:
mode:
authorSean Karlage <skarlage@fb.com>2018-01-04 23:17:22 -0800
committerSean Karlage <skarlage@fb.com>2018-01-04 23:28:51 -0800
commit3f54ed4ddfc6f394906cc160ebff2e41448fbd4e (patch)
tree3d2343020668104f1389ecc0d107087ea1548c4f /lib/chef/provider/user
parentc6433605bae0a9f52c843ca8cb97e64b2bcf5f0a (diff)
downloadchef-3f54ed4ddfc6f394906cc160ebff2e41448fbd4e.tar.gz
Check for set home property before file existence (fixes #5777)
Signed-off-by: Sean Karlage <skarlage@fb.com>
Diffstat (limited to 'lib/chef/provider/user')
-rw-r--r--lib/chef/provider/user/dscl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb
index 60167856d1..bc865b17c5 100644
--- a/lib/chef/provider/user/dscl.rb
+++ b/lib/chef/provider/user/dscl.rb
@@ -318,7 +318,7 @@ user password using shadow hash.")
end
def current_home_exists?
- ::File.exist?(current_resource.home)
+ !!current_resource.home && ::File.exist?(current_resource.home)
end
def new_home_exists?