Skip to content

Wildcards don't work with vars specified in task includes #2732

@robak86

Description

@robak86

Description

Given this config file:

version: '3'

includes:
  'stack:*':
    taskfile: ./Taskfile.stack.yml
    vars:
      ENV: '{{index .MATCH 0}}'

the app raises the following error:

template: :1:2: executing "" at <index .MATCH 0>: error calling index: index of untyped nil

The matching using index .MATCH 0 works inside the included Taskfile.stack.yml, but since the configuration allows passing vars for the included task files, would it be possible to support index .MATCH in the includes vars section as well? That enables a clean approach where included tasks don't have to know how to extract the variables.

Version

3.49.1

Operating system

MacOS 15.7.4

Experiments Enabled

No response

Example Taskfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: needs triageWaiting to be triaged by a maintainer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions