diff --git a/internal/compiler/v3/compiler_v3.go b/internal/compiler/v3/compiler_v3.go index 71e6c9779f..eb6751eaad 100644 --- a/internal/compiler/v3/compiler_v3.go +++ b/internal/compiler/v3/compiler_v3.go @@ -97,9 +97,6 @@ func (c *CompilerV3) getVariables(t *taskfile.Task, call *taskfile.Call, evaluat if err := c.TaskfileEnv.Range(rangeFunc); err != nil { return nil, err } - if err := c.TaskfileVars.Range(rangeFunc); err != nil { - return nil, err - } if t != nil { if err := t.IncludedTaskfileVars.Range(taskRangeFunc); err != nil { return nil, err @@ -119,6 +116,9 @@ func (c *CompilerV3) getVariables(t *taskfile.Task, call *taskfile.Call, evaluat if err := t.Vars.Range(taskRangeFunc); err != nil { return nil, err } + if err := c.TaskfileVars.Range(rangeFunc); err != nil { + return nil, err + } return result, nil }