Skip to content

Array function signatures are not obvious from docs or error messages #2224

@agirardeau

Description

@agirardeau

I expected the example Taskfile below to run echo 1 2 3, printing 1 2 3. Instead I get the following error:

template: :1:13: executing "" at <.ARGS>: wrong type for value; expected string; got []interface {}

Perhaps I'm doing something dumb here (misusing the join function?), but it isn't exactly obvious to me what to change.

Version

v3.42.1

Operating system

WSL

Experiments Enabled

No response

Example Taskfile

version: '3'

vars:
  ARGS:
    - '1'
    - '2'
    - '3'

tasks:
  exec:
    cmds:
      - echo {{ join .ARGS ' ' }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: docsChanges related to documentation.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions