-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%TEMP% is broken on Windows #712
Comments
@mvdan thanks for reporting this, you might want to report this to https://github.com/actions/virtual-environments since they in charge of setting up the machine and user that is going to execute the runner. :) |
Ah, my bad. Is there a way to move this issue without closing + opening another one? |
@mvdan I am trying to get permission so I can just transfer the issue for you. :) |
Thanks! I also forgot to link to the original post on the forum - done. |
Hello, @mvdan |
I see. I'm surprised because other CIs, like Travis and AppVeyor, didn't do this. Hence many repos, like two of mine, suddenly break when moving to Actions. I also don't quite get if this is truly required for Actions. It doesn't seem like the expanded path contains any spaces :) |
To clarify, the directory works when opened. What breaks is when programs assume that You could argue you should fix those programs, but given that it seems like the shortening is unnecessary (no spaces), I'm not sure what's the point. |
Disable 8dot3name can break some customers: |
Oh :( fair enough, thanks for the quick replies. I completely understand your position, though I'm a bit frustrated that we're all dealing with backwards compatibility issues from many decades ago. The issue can be closed as far as I'm concerned, as I don't see another possible suggestion or improvement. |
Just one last question - was this issue raised with Xamarin anywhere? I assume this is a bug they should fix, even if it might take years (or forever) for Actions to be able to remove the workaround. |
@mvdan, As a workaround you can redefine variables TMP and TEMP:
The second variant - https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables:
|
@mvdan, Feel free to open the thread if you have any concerns. |
After https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ the new syntax for setting
|
…he actual directory path. See actions/runner-images#712.
the problem is explained in actions/runner-images#712 but the solution does not apply here. ${TEMPDIR} does not seem to care about $env:TEMP or $env:TMP
Having a similar issue using Python with Encountered the following differences in unittests on GitHub Actions:
Managed to fix this using pathlib.Path.resolve(). |
* test Repository.from_config with both relative and absolute paths * explicitly test path args for Repository.__init__ * extend test for Repository.save_config to ensure relative paths * save relative paths to config file, if possible Although using paths that are *not* relative to the current working directory (cwd) is discouraged, this *should* still be possible. So, if the path is not relative to cwd, we just save the absolute path. * try to fix github actions for windows/mac see this issue: actions/runner-images#712 * handle 8.3 filenames in Repository.save_config() * add _patched_resolve() as workaround for cpython #82852 for python <3.10 on windows * ruff formatting
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:
This was causing me issues because the actual home dir is
C:\Users\runneradmin
, which I checked viaecho %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 beC:\Users\runneradmin\AppData\Local\Temp
. In other words, they should have%USERPROFILE%
as a prefix.The text was updated successfully, but these errors were encountered: