Skip to content

Erroneous “enum reference must resolve to a list” #3020

Description

@RemiBardon

Description

Given the example Taskfile, when I:

task foo FOO=bar

then I get:

enum reference ".LIST" must resolve to a list

It usually works in other places, I don’t get why it doesn’t work here.

My use case is: allowing a set of possible values based on the result of a ls (i.e. “choosing a file”, more or less).

Version

3.52.0

Operating system

macOS 15.7.7 (24G720)

Experiments Enabled

No response

Example Taskfile

version: 3

vars:
  LIST_STR: { sh: printf '%s\n' aaa bbb ccc }
  LIST: { ref: splitLines .LIST_STR }

tasks:
  foo:
    requires:
      vars:
        - name: FOO
          enum: { ref: .LIST }

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

    No labels
    No labels

    Fields

    No fields configured for support.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions