summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-11-19 10:29:12 -0600
committerLuke Kanies <luke@madstop.com>2007-11-19 10:29:12 -0600
commit0ae55774a67f481181feeb241538a94bbeae88de (patch)
treeff51780f625b0fe7c21ee13aa02468b96a8866af /lib/puppet
parent2b14f627aca1d5be69cf6606044df4d6e67f6eba (diff)
parent385141599f7a01687113ff5d8d88d07c64ab6b65 (diff)
downloadpuppet-0ae55774a67f481181feeb241538a94bbeae88de.tar.gz
puppet-0ae55774a67f481181feeb241538a94bbeae88de.tar.xz
puppet-0ae55774a67f481181feeb241538a94bbeae88de.zip
Merge commit 'davids-bugfixes/tests/fix-HOME-dependency'
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/defaults.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index ce1411b62..5914c3219 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -6,6 +6,10 @@ module Puppet
var = nil
name = $0.gsub(/.+#{File::SEPARATOR}/,'').sub(/\.rb$/, '')
+ # Make File.expand_path happy
+ require 'etc'
+ ENV["HOME"] ||= Etc.getpwuid(Process.uid).dir
+
if name != "puppetmasterd" and Puppet::Util::SUIDManager.uid != 0
conf = File.expand_path("~/.puppet")
var = File.expand_path("~/.puppet/var")