Issue #12494 has been updated by Daniel Pittman.

Chris Price wrote:

> However, I'm not 100% sure that users would expect this same behavior for, 
> e.g., "puppet apply".  At the very least we'd have to be careful to have 
> expanded any relative paths provided as command line args *before* we changed 
> the working directory; otherwise, something like "puppet apply ./foo/bar.pp" 
> would yield very confusing results.

Supporting that is fine; once the input file is read, none of the other 
behaviour of the system should be influenced by the CWD - you can't use 
relative paths in your manifest content, so that should (hopefully) make it 
reasonably sane to work with...
----------------------------------------
Bug #12494: When cwd is invalid, puppet prints a stack trace
https://projects.puppetlabs.com/issues/12494#change-54566

Author: Ben Ford
Status: Accepted
Priority: Normal
Assignee: Chris Price
Category: Doh!
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


<pre>
[root@henry ~]# mkdir test
[root@henry ~]# cd test
[root@henry test]# puppet apply 
/etc/puppetlabs/puppet/manifests/resource_defaults.pp 
notice: /Stage[main]//File[/tmp/default]/mode: mode changed '644' to '755'
notice: Finished catalog run in 0.05 seconds
[root@henry test]# rm -rf ../test
[root@henry test]# puppet apply 
/etc/puppetlabs/puppet/manifests/resource_defaults.pp 
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in `expand_path': 
No such file or directory - getcwd (Errno::ENOENT)
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in 
`look_in'
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in 
`collect'
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:49:in 
`look_in'
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/plugins.rb:54
        from 
/opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:1:in `require'
        from /opt/puppet/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:1
        from /usr/local/bin/puppet:3:in `require'
        from /usr/local/bin/puppet:3
[root@henry test]# 
</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