Description
I have a set of script calling task to accomplish some builds.
I pass the variables using the following syntax:
This used to work until version 3.46.1, which broke this behavior.
Minimal reproducible example
Taskfile.yaml
---
version: '3'
vars:
PROFILE: '{{.PROFILE | default "debug"}}'
RELEASE:
sh: '[[ {{.PROFILE}} == "release" ]] && echo "--release" || echo ""'
tasks:
print:
desc: "Print release"
cmds:
- echo {{.RELEASE}}
Working:
task --version
3.45.4
task -v print PROFILE=release
task: dynamic variable: "[[ release == \"release\" ]] && echo \"--release\" || echo \"\"" result: "--release"
task: "print" started
task: [print] echo --release
--release
task: "print" finished
Not working:
task --version
3.46.1
task -v print PROFILE=release
task: dynamic variable: "[[ debug == \"release\" ]] && echo \"--release\" || echo \"\"" result: ""
task: "print" started
task: [print] echo
task: "print" finished
Version
3.46.1
Operating system
Any
Experiments Enabled
No response
Example Taskfile
---
version: '3'
vars:
PROFILE: '{{.PROFILE | default "debug"}}'
RELEASE:
sh: '[[ {{.PROFILE}} == "release" ]] && echo "--release" || echo ""'
tasks:
print:
desc: "Print release"
cmds:
- echo {{.RELEASE}}
Description
I have a set of script calling task to accomplish some builds.
I pass the variables using the following syntax:
This used to work until version 3.46.1, which broke this behavior.
Minimal reproducible example
Taskfile.yaml
Working:
Not working:
Version
3.46.1
Operating system
Any
Experiments Enabled
No response
Example Taskfile