Repository navigation
fix(link): reject install path aliases - #11785
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe link command now detects self-links by comparing filesystem objects. An end-to-end test verifies that forced linking through a managed-install alias fails without deleting the managed directory or sentinel file. ChangesLink validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Greptile SummaryThis PR strengthens
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "fix(link): reject install path aliases" | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/cli/link.rs`:
- Line 71: Update the self-link guard in the link flow to check
file::is_symlink_to(&target, &path) first and skip the error when the requested
symlink already exists. Only call file::same_file(&path, &target) when target is
not already linked to path, preserving idempotent re-linking.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: c5af9570-fb38-4d4d-a0c2-1f00bd6f9037
📒 Files selected for processing (2)
e2e/cli/test_linksrc/cli/link.rs
13d1eed to
855ef06
Compare
Summary
mise link --forcefrom deleting a managed install reached through a symlink or junction aliasValidation
cargo buildcargo fmt --all -- --checkgit diff --checkbash -n e2e/cli/test_linkAI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.
Summary by CodeRabbit
Bug Fixes
Tests