task icon indicating copy to clipboard operation
task copied to clipboard

Yaml anchor insertion is not correctly recognised, and falls back to error in default branch

Open MetalArend opened this issue 1 year ago • 1 comments

Description

YAML anchors are not correctly recognised, so they end up in the default statement, and error out.

Version

3.41.0

Operating system

Ubuntu

Experiments Enabled

No response

Example Taskfile

version: '3'


tasks:
  foo:
    vars: &anchor
      FOO: true
  bar:
    vars:
      <<: *anchor
      BAR: true

MetalArend avatar Feb 22 '25 00:02 MetalArend

There seems to be a difference when adding vars: *anchor as a oneliner, and using <<: *anchor next to other vars. The latter is triggering the error.

MetalArend avatar Feb 22 '25 00:02 MetalArend