-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Tar cannot overwrite read-only files on Windows #936
Comments
Hello @mzabaluev,
We will consider changing default |
Current implementation of actions/cache uses tar from system32 directory.
Windows2019 image contain bsdtar 3.3.2 in this folder. |
This fails because the |
@mzabaluev I have tested in your test repository on a separate branch the behavior you have mentioned. I have changed a little bit your workflow file, and it works fine with the following configuration:
Could you please verify on your side and provide a result? |
@Darleev Thank you, the Closing, as it's not reasonable to expect the Windows-provided tool in its standard location to be replaced with something that behaves differently. |
Describe the bug
C:\Windows\System32\tar.exe
fails to remove existing files that need to be overwritten by an archive extraction, but have the read-only attribute.Area for Triage:
Scripting and command line
Question, Bug, or Feature?:
Bug
Virtual environments affected
Expected behavior
This workflow should succeed despite read-only object files present in the
.git
directory.The cache action uses this tar executable in this way.
tar
works with these options on the Unix OSes where git also makes its object/pack files read-only, and I haven't found any tar options that could be used to force removal of read-only files specifically on Windows.Actual behavior
Failure with "Can't unlink already-existing object" errors referring to the read-only files.
The text was updated successfully, but these errors were encountered: