You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit 19cf4be added `Puppet::Util::Tempfile`,
based on ruby 1.9.3p547. It was later renamed to `Uniquefile`. The code
contained a bug whereby if any TEMP, TMP, etc environment variable was defined,
but referred to a non-existent directory, then `Uniquefile.new` would raise and
never fallback to other candidate temp directories.
Ruby 2.0 added `Dir::Tmpname` as a way to generate a unique name. So just call that
and delete the problematic `make_tmpname`, etc private methods. There have also
been a number of fixes to Dir::Tmpname since 1.9.3:
* Ignore empty TMP, etc env variables
* Ignore TMP, etc env variables that refer to non-existent directories
* Warn if TMP, etc exist, but are not directories, not writable, etc
* Raising if we exhaust the list of candidate temp dirs
* Restricting allowed characters to only /,-.0-9A-Z_a-z~/
0 commit comments