fix(targets): use relative symlinks on non-Win#22
Conversation
📝 WalkthroughWalkthroughModified symlink creation logic to compute the linkTarget as a path relative to the target's parent directory on non-Windows platforms; Windows still uses the absolute sourceDir. A new test verifies the relative symlink behavior on non-Windows systems. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
There was a problem hiding this comment.
Pull request overview
Updates applyTargetDir to create relative symlink targets on non-Windows platforms, improving portability of created target links.
Changes:
- Compute a relative
linkTargetforfs.symlinkon non-Windows (path.relative(parentDir, sourceDir)), while keeping Windows behavior unchanged. - Add a unit test asserting the symlink target is relative on non-Windows platforms.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/cache/targets.ts |
Switches non-Windows symlink creation to use relative link targets. |
tests/targets.test.js |
Adds coverage verifying the created symlink target is relative (non-Windows only). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit