Open titpetric opened 1 month ago
I have stumbled over that too:
~/d/tmp►batcat Taskfile.yml 4.526s 14:52
───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: Taskfile.yml
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ version: "3"
2 │
3 │ env:
4 │ GLOBAL_NAME: "foo"
5 │
6 │ tasks:
7 │ hello:
8 │ cmds:
9 │ - echo "$GLOBAL_NAME"
10 │ - echo "$INDIRECT_NAME"
11 │ - echo "$ENV_NAME"
12 │ env:
13 │ INDIRECT_NAME:
14 │ sh: echo "$GLOBAL_NAME"
15 │ ENV_NAME:
16 │ sh: echo "bar"
17 │
18 │
───────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
~/d/tmp►task hello 14:52
task: [hello] echo "$GLOBAL_NAME"
foo
task: [hello] echo "$INDIRECT_NAME"
task: [hello] echo "$ENV_NAME"
bar
It looks like sh
initialization does not get globally set env
I declared global env in a taskfile like so:
The expected output of this would be:
Actual output of this is:
Seems the vars
sh
are not picking up the taskfile env which would be my expectation...