RiotGamesCookbooks / rbenv-cookbook

Installs and configures rbenv
http://community.opscode.com/cookbooks/rbenv
Apache License 2.0
137 stars 109 forks source link

Unset TMPDIR on Darwin (Mac OS X) #128

Closed spkane closed 3 years ago

spkane commented 8 years ago

Between Chef, Ruby, and the rbenv cookbook, there is a edge case that manifests on OS X when you set an rbenv user.

It is caused by the fact that the rbenv command is run under the context of the rbenv user, but still has some of the shell environments from the initiating user (like TMPDIR), which means that rbenv can't write to the temporary directory, so we can't let the rbenv commands rely on that environment variable.

This simply ensures that we use a standard temp directory and adds "mac_os_x" to the supported operating systems.

Note: On OS X every single user has their own default temporary directory, that has permissions very restrictive permissions tied to that user.