Skip to content

[v3.39.0] defer no longer evaluates variables #1803

@robcao

Description

@robcao

defer is no longer evaluating variables in task 3.39.0. In the sample Taskfile.yml below, I've created a simple reproduction.

To reproduce:

Run task my-repro with the taskfile below.

See the following output is

my-value

Expected behavior (+ the behavior on v3.38.0):

my-value
my-value
# https://taskfile.dev

version: '3'
silent: true
tasks:
  my-repro:
    cmds:
      - defer: echo {{ .MY_VAR }}
      - echo {{ .MY_VAR }}
    vars:
      MY_VAR: my-value
  • Task version: 3.39.0
  • Operating system: wsl2/ubuntu22.04, Shell: GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • Experiments enabled:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions