Issue #12336 has been updated by Chris Price.
I can see a few different ways to handle this: 1) If we find a "~" in the user's PATH, ignore that element from the path and print a warning. 2) Attempt to capture the user's HOME environment variable when puppet starts up, and cache it somewhere. Refer back to that when we are attempting to expand the "~" PATH element. The first solution would be cleaner, but would be unable to execute binaries that were installed in a user's home directory unless they change their PATH to be absolute (rather than using the "~"). The second solution would be more bullet-proof but might require the introduction of some kind of semi-global variable to cache the value in--which would not be the end of the world, but is a little messier than the first solution. ---------------------------------------- Bug #12336: executing system commands may fail if user's PATH contains a tilde https://projects.puppetlabs.com/issues/12336 Author: Chris Price Status: Accepted Priority: Low Assignee: Chris Price Category: Target version: Affected Puppet version: Keywords: Branch: As a result of the changes from #5224, we are now unsetting the HOME environment variable when we execute system commands from within puppet. (This applies mostly to the Exec provider, but may also affect other providers that issue system commands.) An exception will be thrown if the following conditions are met: * User's PATH contains a literal '~' character * The command to be executed is not specified via an absolute path Should be reproducible by adding, e.g., "~/bin" to PATH and then running the spec/unit/util_spec.rb tests. -- 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.
