fix(cache): honor plugin filter when pruning cache#9914
Conversation
There was a problem hiding this comment.
Code Review
This pull request enhances the mise cache prune command by allowing users to target specific plugins for cache removal and adds a corresponding end-to-end test. The implementation includes logic to convert plugin names to kebab-case and updates the command's output to list the specific plugins processed. The review feedback correctly identifies a terminology error where the word "clear" was replaced with "prune" in the help text for the clear command across documentation, man pages, and completion specs. Since clear performs a full deletion while prune is age-based, the feedback advises reverting these specific text changes to maintain semantic clarity for users.
Greptile SummaryThis PR fixes
Confidence Score: 5/5Safe to merge — the change is a narrow, well-scoped bug fix that only affects The new code path directly mirrors the battle-tested No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "docs(cache): fix generated cache clear w..." | Re-trigger Greptile |
Summary
mise cache prune [PLUGIN]...argument instead of always pruning the whole cache.mise cache clearby mapping each requested plugin name to its cache subdirectory before pruning stale files.mise cache prunepath only, because the env cache is not scoped to a single plugin directory.cache clearwording unchanged.Behavior
Before this change,
mise cache prune nodeacceptednodebut ignored it and pruned all cache directories, plus the env cache. With this change,mise cache prune nodeonly prunes stale files under the node cache directory. Runningmise cache prunewith no arguments keeps the existing all-cache behavior.Testing
cargo fmt --all -- --checkgit diff --checkmise run test:e2e e2e/cli/test_cache_prune_plugin