fix(tasks): make file paths relative to config location and templateable#7005
Merged
fix(tasks): make file paths relative to config location and templateable#7005
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the file attribute in task definitions by making it relative to config_root and templateable, achieving feature parity with the existing dir attribute.
- Implements
Task::file_path()async method for rendering templated file paths - Adds
Task::file_path_raw()for non-templated display purposes - Updates all call sites to use the new async method properly
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/task/mod.rs | Implements file_path() and file_path_raw() methods; updates usage spec parsing and Display impl to use new methods |
| src/task/task_executor.rs | Updates task execution to use async file_path() for retrieving templated file paths |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Includes fixes: - [autofix.ci] apply automated fixes - copilot suggestions
1291e54 to
1b5fce1
Compare
1b5fce1 to
88c2cbc
Compare
Owner
|
bugbot run |
jdx
pushed a commit
that referenced
this pull request
Nov 20, 2025
### 📦 Registry - added nelm by @tony-sol in [#7020](#7020) ### 🚀 Features - **(exec)** ensure MISE_ENV is set in spawned shell when specified via -E flag by @ceelian in [#7007](#7007) ### 🐛 Bug Fixes - **(go)** Don't allow auto mod=vendor mode by @mariduv in [#7006](#7006) - **(nushell)** test `use` not `source`, fix pipeline parse error by @jokeyrhyme in [#7013](#7013) - **(tasks)** make file paths relative to config location and templateable by @halms in [#7005](#7005) ### Chore - **(deny)** add exclusion for number_prefix by @jdx in [e955ecb](e955ecb) ### New Contributors - @mariduv made their first contribution in [#7006](#7006) - @ceelian made their first contribution in [#7007](#7007) ## 📦 Aqua Registry Updates #### New Packages (2) - [`blender/blender`](https://github.com/blender/blender) - [`werf/werf`](https://github.com/werf/werf) #### Updated Packages (1) - [`mas-cli/mas`](https://github.com/mas-cli/mas)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the
fileattribute in tasks relative toconfig_rootand templateable, bringing it to feature parity with thedirattribute.Implements a new async
Task::file_path()method and follows the existing implementation pattern from Task::dir() for consistency.Also adds a
Task::file_path_raw()method for display purposes (cannot be async).Note
Resolve task
filepaths relative toconfig_rootwith templating, and update execution/usage parsing to use the resolved path; add e2e and unit tests.Task::file_path()(async) to resolvefilerelative toconfig_rootwith templating; addTask::file_path_raw()for display.fileinparse_usage_spec,parse_usage_spec_for_display, andDisplay.task_executor, deriveMISE_TASK_FILE/MISE_TASK_DIRand runexec_fileusingtask.file_path(...).e2e/tasks/test_task_file_resolutioncovering relative, nested, absolute, and templated paths.file_pathandfile_path_rawbehaviors.Written by Cursor Bugbot for commit a7148b9. This will update automatically on new commits. Configure here.