X Tutup
Skip to content

templater: expose wildcard MATCH in include vars#2735

Open
SergioChan wants to merge 1 commit intogo-task:mainfrom
SergioChan:fix-2732-include-vars-match
Open

templater: expose wildcard MATCH in include vars#2735
SergioChan wants to merge 1 commit intogo-task:mainfrom
SergioChan:fix-2732-include-vars-match

Conversation

@SergioChan
Copy link

Summary

  • seed call-time vars before include var templating so wildcard MATCH is available while evaluating includes.*.vars
  • preserve existing variable resolution flow; change is scoped to include-var evaluation order
  • add a regression fixture and test covering ENV: '{{index .MATCH 0}}' in wildcard includes

Testing

  • go test ./... -run TestWildcardIncludeVarsCanUseMatch -count=1 (fails locally: repo requires Go 1.25 toolchain, host has Go 1.22.2 and cannot download go1.25 in this environment)
  • Manual verification via regression test logic: before change include vars evaluation hit index of untyped nil; after change the test asserts output contains ENV=prod

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wildcards don't work with vars specified in task includes

1 participant

X Tutup