mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-15 20:20:09 +00:00
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