-
-
Notifications
You must be signed in to change notification settings - Fork 766
Open
Labels
state: needs triageWaiting to be triaged by a maintainer.Waiting to be triaged by a maintainer.
Description
Description
I expected/hoped that defining a dir for a task would mean that any command (e.g cmds, calling other tasks, or dynamic vars) would be executed with that directory as a base. The same goes for including a Taskfile with a dir entry.
But this task definition shows that vars and subcommands are executed against the directory the Taskfile was found in. The same goes for includes with a dir entry set, these are also executed against the parent Taskfiles directory.
one:
dir: some/path
cmds:
- echo "{{.dir}}"
- pwd
- task: two
vars:
dir:
sh: pwd
two:
cmds:
- pwdThis makes it difficult to define reusable tasks which act on the directory of the calling task.
If this is the intended functionality, could a flag be added to allow the behaviour that I was expecting?
Version
3.45.5
Operating system
macOS
Experiments Enabled
No response
Metadata
Metadata
Assignees
Labels
state: needs triageWaiting to be triaged by a maintainer.Waiting to be triaged by a maintainer.