puppetlabs/puppet — pull request #473 by cprice-puppet (2012-02-08 02:44:33+00:00)
Title: (#12336) Util::'which' may fail if user's path contains a tilde

In certain circumstances (user's HOME environment variable is not set, or has
been unset during ruby execution, plus PATH contains a literal ~ character), Util::w
hich would raise an ArgumentError. Handle this error by logging a warning (one time only) and ignoring this element of the PATH.