Closed
Description
- Task version: 3.9.2
- Operating System: macOS 12.1
When a global vars
value starts with a dollar/variable, task fails. I have tried escaping it with $$ and \$ but no help.
Example Taskfile showing the issue (version that works)
version: '3'
vars:
FOO: "does work ${FOO}"
tasks:
default:
cmds:
- echo {{.FOO}}
When you run the above taskfile:
FOO=yes task -t Taskfile.works.yml
task: [default] echo does work ${FOO}
does work yes
Example Taskfile showing the issue (version that does NOT work)
version: '3'
vars:
FOO: "${FOO} <- does not work"
tasks:
default:
cmds:
- echo {{.FOO}}
When you run the above taskfile:
FOO=nowork task -t Taskfile.nowork.yml
open /tmp/-: no such file or directory
task: Command "{FOO} <- does not work" failed: exit status 1
exit 1
My usecase which fails:
TAG: "${CI_REGISTRY_IMAGE}:latest"
Metadata
Assignees
Labels
No labels
Activity