Bug
Since v1.0.89, the action crashes during restoreConfigFromBase when any of the SENSITIVE_PATHS (e.g. CLAUDE.md) is a symlink:
Restoring .claude, .mcp.json, .claude.json, .gitmodules, .ripgreprc, CLAUDE.md, CLAUDE.local.md, .husky from origin/main (PR head is untrusted)
ENOENT: no such file or directory, symlink
Cause
cpSync in restore-config.ts defaults to dereference: false, so it tries to recreate the symlink at .claude-pr/ rather than copying the file contents. This fails because the parent directory doesn't exist yet when symlink() is called.
Introduced in #1174.
Reproduction
- Have a repo where
CLAUDE.md is a symlink (e.g. CLAUDE.md -> AGENTS.md)
- Open a PR and trigger
claude-code-action@v1
- Action crashes with
ENOENT: no such file or directory, symlink
Workaround
Pin to v1.0.88:
- uses: anthropics/claude-code-action@v1.0.88
Fix
#1186
Bug
Since
v1.0.89, the action crashes duringrestoreConfigFromBasewhen any of theSENSITIVE_PATHS(e.g.CLAUDE.md) is a symlink:Cause
cpSyncinrestore-config.tsdefaults todereference: false, so it tries to recreate the symlink at.claude-pr/rather than copying the file contents. This fails because the parent directory doesn't exist yet whensymlink()is called.Introduced in #1174.
Reproduction
CLAUDE.mdis a symlink (e.g.CLAUDE.md -> AGENTS.md)claude-code-action@v1ENOENT: no such file or directory, symlinkWorkaround
Pin to
v1.0.88:Fix
#1186