fix: Call ReplaceVars() to resolve Ref's for imported global vars. (#2632)

This commit is contained in:
Timothy Rule
2026-02-18 18:55:20 +01:00
committed by GitHub
parent 56b316a124
commit 2cdd7d3e43
4 changed files with 24 additions and 0 deletions

View File

@@ -114,6 +114,9 @@ func (c *Compiler) getVariables(t *ast.Task, call *Call, evaluateShVars bool) (*
return nil, err
}
}
// Resolve any outstanding 'Ref' values in global vars (esp. globals from imported Taskfiles).
c.TaskfileVars = templater.ReplaceVars(c.TaskfileVars, &templater.Cache{Vars: result})
if t != nil {
for k, v := range t.IncludeVars.All() {
if err := rangeFunc(k, v); err != nil {