diff options
author | Claire McQuin <mcquin@users.noreply.github.com> | 2014-06-18 15:15:41 -0700 |
---|---|---|
committer | Claire McQuin <mcquin@users.noreply.github.com> | 2014-06-18 15:15:41 -0700 |
commit | c26340adc6f817624fdb68033f6ada261f278881 (patch) | |
tree | 6ec2f5825d8834663d32287048aa891720ade293 /lib | |
parent | ef303ea54815117b95ff4026e2dc4bdafbf13511 (diff) | |
parent | 655e5511f6c4e77fc4d74249c5100da8f3eacf0b (diff) | |
download | chef-c26340adc6f817624fdb68033f6ada261f278881.tar.gz |
Merge pull request #1494 from brettcave/CHEF-5365_master
CHEF-5365 - chef local crashes if home directory is not set
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. |