Skip to content

Env vars don't work as per the documentation ($VAR is not evaluated anymore) #2356

@christophberger

Description

@christophberger

Description

The documentation says that environment variables set through env can be used as $VAR. But this Taskfile (slightly modified from the example in the docs) fails:

version: '3'

env:
  GREETING: Hey, there!

tasks:
  greet:
    cmds:
      - echo Greeting = $GREETING

Output:

> task greet
task: [greet] echo Greeting = $GREETING

Expected:

> task greet
task: [greet] echo Greeting = Hey, there!

Side note: This syntax worked until recently.

Version

3.44.1

Operating system

macOS Sequoia 15.5

Experiments Enabled

No response

Example Taskfile

version: '3'

env:
  GREETING: Hey, there!

tasks:
  greet:
    cmds:
      - echo $GREETING

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: can't reproNot enough information was given to reproduce the issue described.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions