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

Open
SanderKnape opened this issue Jan 29, 2025 · 0 comments
Open

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

SanderKnape opened this issue Jan 29, 2025 · 0 comments
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
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

No branches or pull requests

3 participants