-
-
Notifications
You must be signed in to change notification settings - Fork 763
Closed
Description
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:version: '3' tasks: work: cmds: - echo 'Hello World from Task!'
-
Add task file to
Taskfile.yml:version: '3' includes: common: taskfile: "{{.DIR_PATH}}/common.yml" tasks: default: cmds: - task common:work
-
Run the following command to confirm that everything working as expected when
-dis 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.
Version
Task version: 3.41.0 (pypi)
Operating system
macos
Experiments Enabled
No response
Example Taskfile
# common.yml
version: '3'
tasks:
work:
cmds:
- echo 'Hello World from Task!'
# Taskfile.yml
version: '3'
includes:
common:
taskfile: "{{.DIR_PATH}}/common.yml"
tasks:
default:
cmds:
- task common:workMetadata
Metadata
Assignees
Labels
No labels