diff options
author | skippy <jonathan.yates.jones@gmail.com> | 2019-11-18 01:00:23 +0000 |
---|---|---|
committer | skippy <jonathan.yates.jones@gmail.com> | 2019-11-18 01:00:23 +0000 |
commit | 5d67a3dca1c4f601ac65de0a75867afd1e0af2c4 (patch) | |
tree | ae60bec3a98cbf7f96e4f8810978c93f95833ab1 /lib/chef/provider | |
parent | b2a69fa7f4461ccf2000bfeea05ed98ab995fa7d (diff) | |
download | chef-5d67a3dca1c4f601ac65de0a75867afd1e0af2c4.tar.gz |
Replaced 'test' shellout with `Dir.exist?`
Signed-off-by: Jonathan Jones <gitmaster@thespooky.house>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/user/linux.rb | 5 |
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 |