Repository navigation
feat(doctor): report shadowed shims - #10919
Conversation
📝 WalkthroughWalkthrough
ChangesShim shadowing diagnostics
Estimated code review effort: 3 (Moderate) | ~20 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 improves
Confidence Score: 5/5Safe to merge — the new shadowing check is purely diagnostic (warnings only, no PATH mutations), gated behind is_activated() and shims_on_path(), and the refactor of get_shim_diffs into a struct is backward-compatible with the one other call site in reshim. All three changes are additive and low-risk: the struct refactor is mechanical, the new check_shim_shadowing method correctly deduplicates via checked_commands, filters missing shims, and only emits a warning rather than an error so false positives do not break workflows. The e2e test covers both positive and negative cases. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(doctor): deduplicate shim checks" | Re-trigger Greptile |
Summary
Root cause
mise doctoronly checked whether the shim directory appeared anywhere in PATH. Its existing PATH-order diagnostic applies to activated shells, so shim-only setups could reportshims_on_path: yesandNo problems foundeven when a system executable shadowed a mise shim.This does not change PATH precedence. Entries before the shim directory still intentionally win; doctor now explains the concrete consequence.
Maintainer note
This is an optional diagnostic improvement rather than a runtime fix. If warning about intentional PATH overrides does not fit the intended scope of
mise doctor, feel free to close this PR.Context: #5395
Validation
mise run formatcargo check --all-featuresmise run test:e2e cli/test_doctor_shim_shadowingmise run test:e2e cli/test_doctorSummary by CodeRabbit
mise doctornow warns when mise shims are shadowed by earlier executables in yourPATH.PATHordering is corrected.