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
This is a follow up to the issue described in #9385
Puppet::FileSystem::Uniquefile creates files relative to the current temp directory. It searches these environment variables (in order) TMPDIR, TMP or TEMP. If any of those are set and refer to a non-existent directory, then Uniquefile.new will raise, never falling back to later variables. On Windows, we redirect the child process' stdout to a Uniquefile.new However, this bug means execution can fail due to an errant temp related environment variable.
Expected Behavior
Puppet::FileSystem::Uniquefile should not raise in this situation. Also the code should be updated to take advantage of other improvements made to Tempfile, since Uniquefile was created.
C:\Users\Administrator\puppet>set TMPDIR=c:\doesntexist
C:\Users\Administrator\puppet>bundle exec puppet resource exec c:/windows/system32/whoami.exe logoutput=true
Error: No such file or directory @ rb_file_s_stat - c:\doesntexist
Error: /Exec[c:/windows/system32/whoami.exe]/returns: change from 'notrun' to ['0'] failed: No such file or directory @ rb_file_s_stat - c:\doesntexist
Environment
Version 7.31.0, 8.6.0
Platform Windows
The bug has existed for a long time.
The text was updated successfully, but these errors were encountered:
Describe the Bug
This is a follow up to the issue described in #9385
Puppet::FileSystem::Uniquefile
creates files relative to the current temp directory. It searches these environment variables (in order)TMPDIR
,TMP
orTEMP
. If any of those are set and refer to a non-existent directory, thenUniquefile.new
will raise, never falling back to later variables. On Windows, we redirect the child process' stdout to aUniquefile.new
However, this bug means execution can fail due to an errant temp related environment variable.Expected Behavior
Puppet::FileSystem::Uniquefile should not raise in this situation. Also the code should be updated to take advantage of other improvements made to Tempfile, since Uniquefile was created.
Steps to Reproduce
After #9385 is fixed:
Environment
The bug has existed for a long time.
The text was updated successfully, but these errors were encountered: