Skip to content

fix(task): use config_root instead of project_root for task base path#6609

Merged
jdx merged 1 commit intojdx:mainfrom
risu729:use-config-root-tasks
Oct 8, 2025
Merged

fix(task): use config_root instead of project_root for task base path#6609
jdx merged 1 commit intojdx:mainfrom
risu729:use-config-root-tasks

Conversation

@risu729
Copy link
Copy Markdown
Contributor

@risu729 risu729 commented Oct 8, 2025

Fixes #5987.
We currently resolve task_config.includes relative to the project_root, but global configs don't have project_root and env::HOME is used as a fallback.

This PR fixes the root of task_config.includes to config_root, which is MISE_GLOBAL_CONFIG_ROOT for global tasks.
This might be confusing for system configs like /etc/mise/config.toml, but I think the consistency with local config files should be prioritised here.

task_config.dir is also joined with config_root.


Note

Switch task base path resolution to use config_root for both config-defined and file-discovered tasks.

  • Tasks Loading:
    • Use cf.config_root() as the base path when loading tasks (load_config_tasks, load_file_tasks).
    • Remove reliance on project_root with env::HOME fallback.

Written by Cursor Bugbot for commit a6fe174. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings October 8, 2025 20:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes task loading to use the correct base path by switching from project_root() to config_root() when resolving task paths.

  • Replaced project_root with config_root variable
  • Updated function calls to pass config_root instead of project_root
  • Removed fallback to env::HOME when project root is unavailable

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/config/mod.rs
@jdx
Copy link
Copy Markdown
Owner

jdx commented Oct 8, 2025

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


@jdx jdx merged commit 996bc8f into jdx:main Oct 8, 2025
30 checks passed
@risu729 risu729 deleted the use-config-root-tasks branch October 9, 2025 00:02
jdx pushed a commit that referenced this pull request Oct 10, 2025
### 📦 Registry

- add lazyssh by @TyceHerrman in
[#6610](#6610)

### 🚀 Features

- **(config)** Add a ceiling to how mise searchs for config & tasks by
@richardthe3rd in [#6041](#6041)

### 🐛 Bug Fixes

- **(task)** use config_root instead of project_root for task base path
by @risu729 in [#6609](#6609)
- **(task)** resolve project tasks in run blocks using TaskLoadContext
by @jdx in [#6614](#6614)
- **(task)** dont truncate task message when CI is set by @roele in
[#6620](#6620)
- **(ui)** prevent OSC 9;4 progress sequences from being written to
non-terminals by @jdx in [#6615](#6615)

### Chore

- remove cosign/slsa-verifier from mise.toml by @jdx in
[#6616](#6616)

### New Contributors

- @richardthe3rd made their first contribution in
[#6041](#6041)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants