isaacs/osenv — pull request #3 by robertkowalski (2013-05-29 22:39:47+00:00)
Title: Use os.tmpdir() for temp-dirs

The former implementation preferred /home/{username}/tmp on unix
which caused errors for users that had different permissions on
their tmp-folder in their home, like root as owner from a previous
sudo-command.

The new implementation uses a plain os.tmpdir() from node.core.

`os.tmpdir` in node core seems to be essentially the same as this function, with the small difference that not every `process.env`-variable are used on windows

I first thought about checking for the existence of the tmp-dir and then fallback to the /home/{username}/tmp folder but this makes no sense as the system must have the sytsem-/tmp dirs.

This fixes: isaacs/npm#3470