You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to set the working directory using the -d option and include task file from another directory but Task incorrectly resolves the path for the included task file. You can follow the next steps to reproduce the issue:
Create temp directory cd $(mktemp -d)
Add shared task file to common.yml:
version: '3'tasks:
work:
cmds:
- echo 'Hello World from Task!'
Run the following command to confirm that everything working as expected when -d is not set:
$ DIR_PATH="$(pwd)" task -t Taskfile.yml
Hello World from Task!
Run the following command to reproduce the error:
$ DIR_PATH="$(pwd)" task -d "$(mktemp -d)" -t Taskfile.yml
task: No Taskfile found at "/var/folders/yp/syl984812xsdsc7qv3zr7y4c0000gp/T/tmp.1inKucKbvp"
task: Failed to run task "default": exit status 100
I tried to set dir within includes but nothing worked.
0xn3va
changed the title
Using -d option brakes path resolution within includes when dir is set
Using -d option brakes path resolution within includesFeb 21, 2025
Description
Hello team,
I tried to set the working directory using the
-d
option and include task file from another directory but Task incorrectly resolves the path for the included task file. You can follow the next steps to reproduce the issue:Create temp directory
cd $(mktemp -d)
Add shared task file to
common.yml
:Add task file to
Taskfile.yml
:Run the following command to confirm that everything working as expected when
-d
is not set:Run the following command to reproduce the error:
I tried to set
dir
withinincludes
but nothing worked.Version
Task version: 3.41.0 (pypi)
Operating system
macos
Experiments Enabled
No response
Example Taskfile
The text was updated successfully, but these errors were encountered: