puppetlabs/puppet — pull request #2039 by logicminds (2013-11-06 02:03:50+00:00)
Title: 23053 - couldn't find HOME environment -- expanding `~/.puppet'

when running puppet command as non root. Puppet cannot find its home directory because ruby doesn't have a pure bash shell with is required to expand the the tilde.
The fix is to just use the ruby environment HOME path to expand the path correctly.

This will fix many problems regarding running puppet commands from puppet as non root.