Skip to content

Fix ~/.cache ownership after the store restore - #4

Merged
mattrobenolt merged 1 commit into
mainfrom
ci/fix-cache-ownership
Nov 9, 2026
Merged

mattrobenolt merged 1 commit into
mainfrom
ci/fix-cache-ownership

Conversation

@mattrobenolt

Copy link
Copy Markdown
Member

cache-nix-action restores as root, because /nix needs it, and extracts absolute paths. The archive therefore creates ~/.cache owned by root, and the action only restores write permission to ~/.cache/nix, not to its parent.

Any tool that creates a directory under ~/.cache then fails. Zig does: unable to open global cache directory "/home/runner/.cache/zig": AccessDenied, which broke wormhole's test jobs on the first run that adopted the action.

Chowns ~/.cache after the restore and asserts writability in CI.

cache-nix-action restores as root, because /nix needs it, and extracts
absolute paths. The archive therefore creates ~/.cache owned by root, and the
action only restores write permission to ~/.cache/nix, not to its parent.

Any tool that creates a directory under ~/.cache then fails. Zig does, with
`unable to open global cache directory "/home/runner/.cache/zig": AccessDenied`,
which broke wormhole's test jobs.

Chown the directory after the restore, and assert writability in CI.
@mattrobenolt
mattrobenolt merged commit caa9625 into main Nov 9, 2026
2 checks passed
@mattrobenolt
mattrobenolt deleted the ci/fix-cache-ownership branch November 9, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant