- Task version: 3.38.0
- Operating system: macOS
- Experiments enabled: No
Taskfile.yml
version: '3'
vars:
FILE_LEVEL: 'file'
tasks:
echo:
#requires:
# vars: [FILE_LEVEL, TASK_LEVEL]
vars:
TASK_LEVEL: 'task'
cmds:
- echo '{{.FILE_LEVEL}}, {{.TASK_LEVEL}}'
When running task echo with this file, it succeeds:
$ task echo
task: [echo] echo 'file, task'
file, task
Since both variables are set, uncommenting requires should not change the behavior of task echo. However, it fails with the message: task: Task "echo" cancelled because it is missing required variables: TASK_LEVEL. Task-level variable seems to be ignored during the evaluation of requires.
Taskfile.yml
When running
task echowith this file, it succeeds:Since both variables are set, uncommenting
requiresshould not change the behavior oftask echo. However, it fails with the message:task: Task "echo" cancelled because it is missing required variables: TASK_LEVEL. Task-level variable seems to be ignored during the evaluation ofrequires.