fix: Call ReplaceVars() to resolve Ref's for imported global vars. by trulede · Pull Request #2632 · go-task/task

added 2 commits

January 17, 2026 13:23

@vmaerten vmaerten changed the title Call ReplaceVars() to resolve Ref's for imported global vars. fix: Call ReplaceVars() to resolve Ref's for imported global vars.

Feb 18, 2026

vmaerten

vmaerten added a commit that referenced this pull request

Feb 18, 2026

This was referenced

Mar 7, 2026

JonZeolla added a commit to JonZeolla/task that referenced this pull request

Mar 7, 2026
…bbering sh: vars

The ReplaceVars call added in go-task#2632 re-processes all TaskfileVars after
they've been resolved by rangeFunc. For sh: variables, this overwrites the
already-resolved Value with a new Var that has the original Sh string but
nil Value, causing dynamic variables to resolve to empty strings when the
Taskfile has includes.

Fix by only resolving variables that actually have Ref values set, leaving
already-resolved sh: variables untouched.

Fixes go-task#2720

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Copilot AI pushed a commit to libor-m/task that referenced this pull request

Mar 27, 2026
…o-task#2632)

Co-authored-by: libor-m <1497769+libor-m@users.noreply.github.com>

Copilot AI pushed a commit to libor-m/task that referenced this pull request

Mar 27, 2026
Co-authored-by: libor-m <1497769+libor-m@users.noreply.github.com>