mirror of
https://github.com/go-task/task.git
synced 2026-06-12 10:21:50 +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
21 lines
311 B
YAML
21 lines
311 B
YAML
version: "3"
|
|
|
|
vars:
|
|
ROOT_VAR: from_root
|
|
|
|
includes:
|
|
a: ./inc_a
|
|
b: ./inc_b
|
|
|
|
tasks:
|
|
default:
|
|
desc: Test scoped includes - vars should be isolated
|
|
cmds:
|
|
- task: a:print
|
|
- task: b:print
|
|
|
|
print-root-var:
|
|
desc: Print ROOT_VAR from root
|
|
cmds:
|
|
- echo "ROOT_VAR={{.ROOT_VAR}}"
|