diff options
author | brettcave <brett@cave.za.net> | 2014-06-13 09:47:42 +0200 |
---|---|---|
committer | brettcave <brett@cave.za.net> | 2014-06-13 09:47:42 +0200 |
commit | 3de901156fddfe33ffa30c73c4d36d9bc288ab6d (patch) | |
tree | f55b4bff15a7d0cd22c54f62889548d322991e91 /lib | |
parent | ac0a8930dca1f26cbddff75741c8ff5f5f47eac7 (diff) | |
download | chef-3de901156fddfe33ffa30c73c4d36d9bc288ab6d.tar.gz |
CHEF-5365 - if user home directory is not set via environment, then default user_home to the current directory.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/config.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb index a908fb83d4..0ac82cc5ac 100644 --- a/lib/chef/config.rb +++ b/lib/chef/config.rb @@ -552,8 +552,8 @@ class Chef windows_home_path = env['SYSTEMDRIVE'] + env['HOMEPATH'] if env['SYSTEMDRIVE'] && env['HOMEPATH'] end - # returns a platform specific path to the user home dir - default( :user_home ) { env['HOME'] || windows_home_path || env['USERPROFILE'] } + # returns a platform specific path to the user home dir if set, otherwise default to current directory. + default( :user_home ) { env['HOME'] || windows_home_path || env['USERPROFILE'] || Dir.pwd } # Enable file permission fixup for selinux. Fixup will be done # only if selinux is enabled in the system. |