Commit 9879a03
validate-legacy-compatibility: detect CLAUDE.md presence with lstat, not existsSync
Address review feedback on #206: existsSync follows symlinks, so a dangling
CLAUDE.md symlink (link to a missing target) reported as absent and skipped the
very regular-file guard meant to reject symlinks. Switch the presence test to
lstatSync (non-following) and skip only on ENOENT, so any committed symlink —
resolving or dangling — reaches assertRegularFile and fails the check.
Verified: a dangling CLAUDE.md symlink now fails (previously passed); clean tree
still passes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent c54ab08 commit 9879a03
1 file changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
78 | | - | |
79 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | | - | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
0 commit comments