Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show allowed values when variable with set enum is missing #2027

Closed
SanderKnape opened this issue Jan 29, 2025 · 0 comments · Fixed by #2052
Closed

Show allowed values when variable with set enum is missing #2027

SanderKnape opened this issue Jan 29, 2025 · 0 comments · Fixed by #2052
Assignees
Labels
area: ui Changes related to the UI of Task.

Comments

@SanderKnape
Copy link

SanderKnape commented Jan 29, 2025

Description

With a task like the following:

version: '3'
tasks:
  deploy:
    cmds:
      - echo "deploying to {{.ENV}}"
    requires:
      vars:
        - name: ENV
          enum: [dev, beta, prod]

The following error will be shown when the required variable is missing:

task: Task "deploy" cancelled because it is missing required variables: ENV

When an enum is set like here, it would be great if the allowed values would be shown in the error. This way the user doesn't have to look into the Taskfile to see what values are allowed in situations where this isn't obvious.

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Jan 29, 2025
@pd93 pd93 added area: ui Changes related to the UI of Task. and removed state: needs triage Waiting to be triaged by a maintainer. labels Jan 29, 2025
@vmaerten vmaerten self-assigned this Feb 9, 2025
@vmaerten vmaerten linked a pull request Feb 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui Changes related to the UI of Task.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants