You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
version: '3'
vars:
root: 'x'
exp: 'exp-{{.root}}'
tasks:
test:
desc: a
cmds:
- echo root is '{{.root}}'
- echo but exp is '{{.exp}}'
Current output:
$ task test root=y
task: echo root is 'y'
root is y
task: echo but exp is 'exp-x'
but exp is exp-x
$ task root=y test
task: echo root is 'y'
root is y
task: echo but exp is 'exp-y'
but exp is exp-y
Expected: both variants should output the same — exp variable should be exp-y because root is y.
The text was updated successfully, but these errors were encountered:
@andreynering yes, the same on v2, but I thought v3 was going to address this nasty issue. It's very ambiguous to see such behavior.
Imagine my user case: I have a task that creates docker container of an image with specified version and I print a message like: echo creating docker container with version {{.version}}
I also defined image: "backend/server:{{.version}}" and run something like docker run --name backend-server-{{.version}} {{.image}}
As result I have a message that task is going to create a container of correct version but ends up with an incorrect one.
On the other hand, GNU's make doesn't care about variables' order and just sets variables values to what users have specified.
I'm using latest version of v3 branch
Taskfile.yml
Current output:
Expected: both variants should output the same — exp variable should be
exp-y
becauseroot
isy
.The text was updated successfully, but these errors were encountered: