-
-
Notifications
You must be signed in to change notification settings - Fork 763
Description
Not sure if this is intended behaviour when double nesting included taskfiles or not. Example below:
Base Taskfile includes another Taskfile in the tasks subdirectory.
# Taskfile.yml
version: '3'
includes:
included: ./tasks/included.ymlIncluded Taskfile includes a utility Taskfile using the new internal keyword. It then defines 2 tasks. One to print the current directory and one to call a task in the util Taskfile that also prints its current directory.
# tasks/included.yml
version: '3'
includes:
util:
taskfile: ./util.yml
internal: true
tasks:
pwd:
cmds:
- pwd
util-pwd:
cmds:
- task: util:pwd# tasks/util.yml
version: '3'
tasks:
pwd:
cmds:
- pwdOutput:
❯ task included:pwd
task: [included:pwd] pwd
/abs/path/to/project
❯ task included:util-pwd
task: [included:util:pwd] pwd
/abs/path/to/project/tasks
The utility Taskfile is getting the working directory of the included Taskfile not the root Taskfile. I can work around this by doing something like this in the included Taskfile:
includes:
util:
taskfile: ./util.yml
internal: true
dir: ../ # <-- fixes problemThis isn't really a problem per se, but it wasn't what I was initially expecting and was wondering if this is the intended behaviour or not. Obviously, any change here would be a breaking one.
- Task version: 3.18
- Operating System: Linux