Files
ccs/scripts
kaitranntt 81add5a05e fix(postinstall): handle broken symlinks during npm install
When upgrading from older CCS versions, ~/.ccs/shared/* directories may
exist as broken symlinks (dangling symlinks pointing to deleted targets).

Problem:
- fs.existsSync() returns false for broken symlinks
- fs.mkdirSync() fails with ENOENT because path exists as broken symlink

Solution:
- Added removeIfBrokenSymlink() helper that detects and removes dangling
  symlinks using lstatSync (doesn't follow symlinks) + statSync (follows)
- Applied to shared directory and all subdirectories before mkdir

Fixes npm install error: ENOENT: no such file or directory, mkdir
2025-12-03 06:06:49 -05:00
..