mirror of
https://github.com/go-task/task.git
synced 2026-06-24 05:05:49 +00:00
Tests verify: - Legacy mode: vars merged globally (A sees B's VAR, can access UNIQUE_B) - Scoped mode: vars isolated (A sees own VAR, cannot access UNIQUE_B) - Inheritance: includes can still access root vars (ROOT_VAR) Test structure: - testdata/scoped_includes/ with main Taskfile and two includes - inc_a and inc_b both define VAR with different values - Cross-include test shows A trying to access B's UNIQUE_B
14 lines
235 B
YAML
14 lines
235 B
YAML
version: "3"
|
|
|
|
vars:
|
|
VAR: value_from_b
|
|
UNIQUE_B: only_in_b
|
|
|
|
tasks:
|
|
print:
|
|
desc: Print vars from include B
|
|
cmds:
|
|
- echo "B:VAR={{.VAR}}"
|
|
- echo "B:UNIQUE_B={{.UNIQUE_B}}"
|
|
- echo "B:ROOT_VAR={{.ROOT_VAR}}"
|