-
-
Notifications
You must be signed in to change notification settings - Fork 769
fix(tasks): make file paths relative to config location and templateable #7005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 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
|
bugbot run |
There was a problem hiding this 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!
### 📦 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 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.