I was running into some test failures when migrating my Windows tests from Travis to GitHub Actions. I ended up narrowing down the breakage to this simple env var:
$ echo %TEMP%
C:\Users\RUNNER~1\AppData\Local\Temp
This was causing me issues because the actual home dir is C:\Users\runneradmin
, which I checked via echo %USERPROFILE%
. Note that the case sensitivity here doesn’t matter for my purposes; it’s the short path (the ~1
) that’s breaking my code.
Is there a reason that the environment is inconsistent like this? I think both %TMP%
and %TEMP%
should be C:\Users\runneradmin\AppData\Local\Temp
. In other words, they should have %USERPROFILE%
as a prefix.