Repository navigation
fix(prune): preserve runtime symlinks during dry runs - #11017
Conversation
📝 WalkthroughWalkthrough
ChangesPrune dry-run behavior
Estimated code review effort: 1 (Trivial) | ~5 minutes 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 fixes a bug where
Confidence Score: 5/5Safe to merge — the change is a minimal, targeted guard that aligns symlink cleanup with the existing dry-run semantics already applied to version removal. The fix is a single three-line conditional wrapping an existing call, the logic is straightforward and directly mirrors the dry-run handling already in place for No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "test(prune): strengthen runtime symlink ..." | 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 `@e2e/cli/test_prune`:
- Around line 10-13: Update the dry-run assertion in the prune test to verify
that the dangling dummy/latest symlink is specifically mentioned in the preview
output, rather than matching the generic “remove” text. Keep the existing
symlink-preservation assertion and ensure the test distinguishes this cleanup
candidate from earlier tool-version removals.
🪄 Autofix (Beta)
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: e4676391-d4e5-4ee7-b0de-86facb53f97f
📒 Files selected for processing (2)
e2e/cli/test_prunesrc/cli/prune.rs
a26eba8 to
52822b4
Compare
Summary
--dry-runand--dry-run-codeRoot cause
Backend uninstall correctly skipped deletion in dry-run mode, but the following runtime-symlink cleanup call was unconditional and could remove dangling generated symlinks.
Tests
cargo fmt --all -- --checkgit diff --checkmise run test:e2e e2e/cli/test_pruneSummary by CodeRabbit
mise prune --dry-runno longer removes broken runtime symlinks; existing symlinks remain intact after the command.mise prune --dry-run-codestill exits non-zero when prune candidates are present, without performing any pruning or symlink cleanup.