diff options
author | Patric Stout <truebrain@openttd.org> | 2021-01-08 15:20:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 15:20:27 +0100 |
commit | 4059ccf863909a777932f6d8f2e937a2bf97b7bb (patch) | |
tree | 7f28ad4d3fd16f467f7106108a19e9ee28e55f7f | |
parent | 7463c46a54bed2d21ee8e8e2e8cfe9d67f5f45dc (diff) | |
download | openttd-4059ccf863909a777932f6d8f2e937a2bf97b7bb.tar.xz |
Fix: [Actions] circumvent Windows tar warning about read-only files (#8524)
Because certain files are read-only, the "restore-cache" step
fails, as Windows tar refuses to overwrite those files (even
if they are identical). Instead of hoping upstream fixes
"restore-cache", just remove the read-only flag on these files
instead.
-rw-r--r-- | .github/workflows/ci-build.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 08f3a7a19..8b9a160d9 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -220,6 +220,18 @@ jobs: - name: Checkout uses: actions/checkout@v2 + # "restore-cache" which is done by "run-vcpkg" uses Windows tar. + # A git clone on windows marks a few files as read-only; when Windows tar + # tries to extract the cache over this folder, it fails, despite the files + # being identical. This failure shows up as an warning in the logs. We + # avoid this by simply removing the read-only mark from the git folder. + # In other words: this is a hack! + # See: https://github.com/lukka/run-vcpkg/issues/61 + - name: Remove read-only flag from vcpkg git folder + shell: powershell + run: | + attrib -r "c:\vcpkg\.git\*.*" /s + - name: Prepare vcpkg (with cache) uses: lukka/run-vcpkg@v6 with: |