Description
When using a variable with another inside, I would expect it to be interpolated at use time.
I don't know if I'm doing something wrong
version: '3'
vars:
A: "a"
B: "b"
AB: "{{ .A }}{{ .B }}"
tasks:
default:
vars:
A: "aa"
cmds:
- echo "{{ .AB }}"
I would expect it to output aab not ab (even with A: '{{ default "a" .A }}' ) is it not working
The whole problem arises from me setting a BUILD_DIR as a var and calculate that based on other variables.. Now if I include this taskfile and change some of the variables that are used in the BUILD_DIR, then these are updated, but BUILD_DIR stays default
Version
3.50.0
Operating system
Win 11 / Linux
Experiments Enabled
No response
Example Taskfile
version: '3'
vars:
A: "a"
B: "b"
AB: "{{ .A }}{{ .B }}"
tasks:
default:
vars:
A: "aa"
cmds:
- echo "{{ .AB }}"
Description
When using a variable with another inside, I would expect it to be interpolated at use time.
I don't know if I'm doing something wrong
I would expect it to output
aabnotab(even withA: '{{ default "a" .A }}') is it not workingThe whole problem arises from me setting a BUILD_DIR as a var and calculate that based on other variables.. Now if I include this taskfile and change some of the variables that are used in the BUILD_DIR, then these are updated, but BUILD_DIR stays default
Version
3.50.0
Operating system
Win 11 / Linux
Experiments Enabled
No response
Example Taskfile