summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/provider/user/linux.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/provider/user/linux.rb b/lib/chef/provider/user/linux.rb
index 0f68074c9f..3f54cc480d 100644
--- a/lib/chef/provider/user/linux.rb
+++ b/lib/chef/provider/user/linux.rb
@@ -60,10 +60,7 @@ class Chef
ret_codes = [0]
if updating_home?
if new_resource.manage_home
- home_dir_not_exist = shell_out("test", "-d", new_resource.home, returns: [1])
- if home_dir_not_exist.error?
- ret_codes << 12
- end
+ ret_codes << 12 if Dir.exist?(new_resource.home)
end
end
ret_codes