opscode/mixlib-shellout — pull request #5 by meineerde (2012-07-12 16:12:33+00:00)
Title: CHEF-2517 Set default HOME environment variable

When changing the user, on UNIX systems, the `$HOME` of the originating user was kept by default which leads to unexpected results when relying on the correct variable in executed scripts.

Unless the HOME is overridden, we now set it to the HOME of the target user, if this information can be retrieved from the `/etc/passwd` file.

This fixes http://tickets.opscode.com/browse/CHEF-2517