improved dir-specific dynamic vars by loganfred · Pull Request #2757 · go-task/task
This PR is concerned with behavior when multiple task files are include:-ed with explicit dir: and use dynamic sh: vars.
- Fixes what I think is a typo where, in merges,
t2.envis not being merged intot1 - Guards IncludedTaskfileVars so it is no longer unconditionally overwritten on each merge, otherwise in
root -> parent -> A/Bincludes, the outer merge overwrites. - Uses
dir:-specific caching ofsh:dynamic vars (e.g. now multiplefind . -name '*.md'is possible)
4.taskRangeFuncshould resolvet.Dirat call time, not construction time, sodir: '{{.VAR}}'variables are available
Assuming I ran it properly, the test suite passes, my minimal repro steps are resolved, and my original bug report scenario is fixed.
I am not a go programmer, this PR was overwhelmingly AI-written, I have no idea if these changes are terrible ideas, but I hope they clarify what might be going wrong in #2753
fixes #2753