Issue #12485 has been reported by Josh Cooper.

----------------------------------------
Bug #12485: Don't call Etc.getpwuid(Process.uid).dir on Windows
https://projects.puppetlabs.com/issues/12485

Author: Josh Cooper
Status: Accepted
Priority: Normal
Assignee: Josh Cooper
Category: windows
Target version: 2.7.x
Affected Puppet version: 2.7.6
Keywords: 
Branch: 


If ENV['HOME'] is not set, then the run mode code will call 
Etc.getpwuid(Process.uid).dir which doesn't work on Windows because there is no 
Process.uid and the 'etc' module is not available.

Normally this code path is not executed, because Ruby always sets the HOME 
environment variable based on the HOMEDRIVE and HOMEPATH environment variables. 
But I suspect that the recent change to unsetting the HOME (and other POSIX) 
environment variables in a different test case. This would explain why this 
failure only occurs in master and not 2.7.x.

<pre>

 2) Puppet::Util::RunMode should have confdir /etc/puppet when run as root
     Failure/Error: @run_mode.conf_dir.should == File.expand_path(etcdir)
     NoMethodError:
       undefined method `dir' for nil:NilClass
     # ./lib/puppet/util/run_mode.rb:75:in `expand_path'
     # ./lib/puppet/util/run_mode.rb:70:in `which_dir'
     # ./lib/puppet/util/run_mode.rb:30:in `conf_dir'
     # ./spec/unit/util/run_mode_spec.rb:13

  3) Puppet::Util::RunMode should have vardir /var/lib/puppet when run as root
     Failure/Error: @run_mode.var_dir.should == File.expand_path(vardir)
     NoMethodError:
       undefined method `dir' for nil:NilClass
     # ./lib/puppet/util/run_mode.rb:75:in `expand_path'
     # ./lib/puppet/util/run_mode.rb:70:in `which_dir'
     # ./lib/puppet/util/run_mode.rb:37:in `var_dir'
     # ./spec/unit/util/run_mode_spec.rb:26
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to