task icon indicating copy to clipboard operation
task copied to clipboard

Variables Passed to Included Taskfile Is Unavilable During Global Variables Expansion

Open liblaf opened this issue 1 year ago • 0 comments

  • Task version: v3.34.1 (h1:yAAxUM54zoaHv+OtDnGgkWSVeiRuaOCn1lPUXPQQA0o=)
  • Operating system: Arch Linux
  • Experiments enabled: None

Reproduction

# Taskfile.yaml
version: "3"

includes:
  hello:
    taskfile: taskfiles/hello.yaml
    vars:
      NAME: world

tasks:
  default:
    deps:
      - hello:default
# taskfiles/hello.yaml
version: "3"

vars:
  MESSAGE: "Hello, {{.NAME}}!"

tasks:
  default:
    cmds:
      - echo "{{.MESSAGE}}"
    requires:
      vars:
        - MESSAGE

Actual Output

$ task
task: [hello:default] echo "Hello, !"
Hello, !

Expected Output

$ task
task: [hello:default] echo "Hello, world!"
Hello, world!

liblaf avatar Feb 10 '24 13:02 liblaf