Skip to content

Using requires with vars fails to show missing required variable name in error message #2228

@ToshY

Description

@ToshY

Description

When using requires with vars, it fails to show which required variable is missing.

task: Task "database" cancelled because it is missing required variables:

Expected to see:

task: Task "database" cancelled because it is missing required variables: DB

Version

3.43.3

Operating system

Ubuntu 22.04.5 LTS

Experiments Enabled

No response

Example Taskfile

version: '3'

tasks:
  database:
    desc: Open database
    silent: true
    vars:
      DB: '{{.d}}'
      NAME: '{{.n}}'
    requires:
      vars:
        - DB
    cmds:
      - |
        echo "{{.DB}}-{{.NAME}}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions