Repository navigation
fix(hooks): skip tool installation in preinstall tasks - #11927
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughTask-backed ChangesTask hook behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant HookDispatcher
participant task_hook_args
participant TaskRunner
HookDispatcher->>task_hook_args: Build task hook arguments
task_hook_args->>TaskRunner: Pass preinstall arguments with --skip-tools
TaskRunner-->>HookDispatcher: Execute or preview task hook
Suggested reviewers: 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 SummaryThe PR prevents task-backed preinstall hooks from triggering nested automatic tool installation and aligns dry-run output with the actual invocation.
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code defects identified. The runtime and preview paths share correctly ordered arguments, preinstall alone skips automatic tool installation as intended, and the documented behavioral boundary is covered by focused unit and end-to-end tests. Important Files Changed
Reviews (1): Last reviewed commit: "fix(hooks): skip tool installation in pr..." | Re-trigger Greptile |
Summary
mise run --skip-toolsso they complete before project or task tools are installedRoot cause
The outer install pipeline invoked the preinstall hook at the correct point, but a
{ task = "..." }hook launched a nestedmise run. That nested run performed its normal automatic tool installation before executing the task, so the nominal preinstall task observed the tools as already installed.Only task-backed preinstall hooks now add
--skip-tools. Enter, leave, cd, and postinstall task hooks retain normal task tool handling.Verification
mise exec -- cargo test --all-features hooks::tests(12 passed)mise run test:e2e e2e/config/test_hooks_task_refe2e/config/test_hooksmise exec -- cargo fmt --all -- --checkmise exec -- cargo check --all-featuresmise exec -- cargo clippy --workspace --all-features --all-targets -- -D warningsmise run lintreached an unrelated actionlint repository-discovery limitation because this checkout uses Sapling without a.gitdirectoryAddresses #8800
AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.
Summary by CodeRabbit
Bug Fixes
Tests
Documentation