task
task copied to clipboard
Bring global variables into scope of include paths
I would like globally declared variables to be in scope for expansion in include paths. I know something similar was requested in https://github.com/go-task/task/issues/670 and rejected, but I'm specifically asking for globally declared variables in the Taskfile, not environment variables.
For example, I would like to be able to abbreviate long paths with variables and use them in includes:
version: "3"
vars:
LONG_PATH: some/very/loooooooooooooooooooong/path
includes:
a: "{{.LONG_PATH}}/a"
a: "{{.LONG_PATH}}/b"
I expected this kind of thing to work, because of the example with OS specific includes in the documentation, but OS is a different kind of variable, apparently. Would you consider adding this?