Skip to content

permission issue causing failure to cache on windows #1024

Closed
@geemus

Description

@geemus

Description:
Post job cleanup fails with permission issues:

Post job cleanup.
"C:\Program Files\Git\usr\bin\tar.exe" --posix -cf cache.tzst --exclude cache.tzst -P -C D:/a/anchor/anchor --files-from manifest.txt --force-local --use-compress-program "zstd -T0"
/usr/bin/tar: C\:/npm/cache/_logs/2024-04-29T15_30_50_704Z-debug-0.log: Cannot open: Permission denied
/usr/bin/tar: C\:/npm/cache/_logs/2024-04-29T15_30_59_272Z-debug-0.log: Cannot open: Permission denied
/usr/bin/tar: Exiting with failure status due to previous errors
Warning: Failed to save: "C:\Program failed with error: The process 'C:\Program Files\Git\usr\bin\tar.exe' failed with exit code 2

Action version:
actions/setup-node@v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
node 20.10.0
npm (? I didn't specify, so the default I suppose)

Repro steps:
Here are what I think would be the relevant bits from our setup:

      - name: Setup Node (prism)
        uses: actions/setup-node@v4
        with:
          cache: npm
          node-version-file: '.tool-versions'
      - run: npm install

I'll note that we just have a package.json and no lock at present in case that is relevant.

Expected behavior:
I expected the caching to "just work" with this setup, as it does with the same invocation on mac/ubuntu.

Actual behavior:
Setup node and the rest of the action work fine, but the cleanup/caching fails (so there is never a cache to be used).

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions