fix(task): auto-install tools from mise.toml for file tasks (#8030)
Summary
- When running file tasks (scripts in
.mise-tasks/), tools defined inmise.tomlwere not auto-installed before execution becauset.cf(config)returnsNonefor file tasks- Adds a fallback that uses the task’s
config_rootto discover and install tools from the project’s config hierarchy, matching what the execution-time toolset build already does- Refactors
collect_tools_from_config_fileto delegate to a newcollect_tools_from_dirmethod for reuseCloses https://github.com/jdx/mise/discussions/8014
Test plan
mise run buildcompiles successfullymise run lint-fixpasses all lintingmise run test:unit— all 446 tests pass- Manual test: create a file task in
.mise-tasks/that uses a tool declared only inmise.toml, verifymise runauto-installs the tool before execution🤖 Generated with Claude Code
[!NOTE] Medium Risk Changes task tool resolution behavior by expanding when project config hierarchy is consulted, which could affect tool selection/precedence for some task setups; covered by a new E2E regression test.
Overview Fixes
task_run_auto_installfor file tasks (scripts inmise-tasks/) by falling back to the task’sconfig_rootto load the project config hierarchy whent.cf(config)isNone, ensuring tools inmise.tomlare discovered and installed before execution.Refactors tool discovery by extracting shared logic into
collect_tools_from_dir, and adds an E2E test (e2e/tasks/test_task_file_auto_install) that runs a file task requiringtinyand asserts it gets auto-installed.Written by Cursor Bugbot for commit 7fce78f07cb5e4d98dca8392ab7804789c343a88. This will update automatically on new commits. Configure here.
Co-authored-by: Claude Opus 4.6 noreply@anthropic.com
mise-en-place
The front-end to your dev env
Getting Started • Documentation • Dev Tools • Environments • Tasks
What is it?
Demo
The following demo shows how to install and use
miseto manage multiple versions ofnodeon the same system. Note that callingwhich nodegives us a real path to node, not a shim.It also shows that you can use
miseto install and many other tools such asjq,terraform, orgo.See demo transcript.
Quickstart
Install mise
See Getting started for more options.
Hook mise into your shell (pick the right one for your shell):
Execute commands with specific tools
Install tools
See dev tools for more examples.
Manage environment variables
Note that
misecan also load.envfiles.Run tasks
See tasks for more information.
Example mise project
Here is a combined example to give you an idea of how you can use mise to manage your a project’s tools, environment, and tasks.
Run it with:
Find more examples in the mise cookbook.
Full Documentation
See mise.jdx.dev
GitHub Issues & Discussions
Due to the volume of issue submissions mise received, using GitHub Issues became unsustainable for the project. Instead, mise uses GitHub Discussions which provide a more community-centric platform for communication and require less management on the part of the maintainers.
Please note the following discussion categories, which match how issues are often used:
Special Thanks
We’re grateful for Cloudflare’s support through Project Alexandria.
Contributors