-
Notifications
You must be signed in to change notification settings - Fork 1.7k
cpSync crashes with ENOENT when sensitive paths are symlinks #1187
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingp2Non-showstopper bug or popular feature requestNon-showstopper bug or popular feature request
Description
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.mdis 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.88Fix
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingp2Non-showstopper bug or popular feature requestNon-showstopper bug or popular feature request
Type
Fields
Give feedbackNo fields configured for issues without a type.