-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Use BSD tar on windows #126
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
Conversation
|
Do you know if bsd tar will be available on all windows versions? Including windows servers? If we are concerned about |
Based on https://docs.microsoft.com/en-us/virtualization/community/team-blog/2017/20171219-tar-and-curl-come-to-windows, it was only added in Build 17063, so older versions of Windows won't have it. The current behavior is that no self-hosted runners will work with |
|
Would it be possible to do a 1.0.4 release with this in it? I am trying to set up self-hosted windows runners for a project, but it always fails to cache anything because of the |
|
@1480c1 There will be a release soon with this change. In the meantime, if you fork the repository and run |
|
Okay, thank you. Don't know much about npm yet so I wasn't sure how to solve the issue on my own. |
Resolves #91
On the Windows Hosted Runners, GNU tar is prepended to the path from the installation of minGW (http://www.mingw.org/). This version of tar doesn't work out of the box with Windows file paths, and required using
--force-localand\file manipulation to work correctly.On self-hosted runners, there's no guarantee that
taron the PATH will be GNU tar, and BSD tar will fail when encountering the extra--force-localoption.This change enforces using the BSD Tar on Windows, allowing for self-hosted runners to use this action. Self-hosted runners without the system tar will fail, but this is better than the current situation where no self-hosted runners work.
Most of the changes in this PR are just moving the
tarcode into its own module to isolate testing and reduce repeated code.The only behavior change is in
getTarPathI verified these changes with a new cache as well as using a cache created by the current
v1to verify compatibility: https://github.com/joshmgross/cache-canary/runs/346337525