Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: includesChanges related to included taskfiles.

    Fields

    No fields configured for support.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions