-
Notifications
You must be signed in to change notification settings - Fork 3.7k
%TEMP% is broken on Windows #712
Description
This was originally posted on the community forum last year. Since the forum seems to be winding down in activity, and I never got a response, I'm reposting it here.
--
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.