Describe the bug
C:\Windows\System32\tar.exe fails when an archive extraction needs to overwrite existing files with the read-only attribute. This creates problems in the cache action: actions/cache#198
To Reproduce
Trigger this GitHub workflow two times:
on: push
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: List read-only files
run: Get-ChildItem .git -Recurse -Attributes ReadOnly
- uses: actions/cache@v2
with:
key: break-me
path: .git
The cache action fails on the second run, with tar reporting "Can't unlink already-existing object" errors referring to the read-only files.
Expected behavior
On the second run, the cache action should restore from the key with no errors.
Additional context
The system tar is selected in preference to GNU tar, which works as expected when --force-local option is used. GNU tar is installed in the Windows virtual environment as part of the Git toolkit and its full path name is "C:\Program Files\Git\usr\bin\tar.exe".
Describe the bug
C:\Windows\System32\tar.exefails when an archive extraction needs to overwrite existing files with the read-only attribute. This creates problems in the cache action: actions/cache#198To Reproduce
Trigger this GitHub workflow two times:
The cache action fails on the second run, with tar reporting "Can't unlink already-existing object" errors referring to the read-only files.
Expected behavior
On the second run, the cache action should restore from the key with no errors.
Additional context
The system tar is selected in preference to GNU tar, which works as expected when
--force-localoption is used. GNU tar is installed in the Windows virtual environment as part of the Git toolkit and its full path name is "C:\Program Files\Git\usr\bin\tar.exe".