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

Allow overriding of global variable default at the task level #2025

Open
luiavila opened this issue Jan 27, 2025 · 0 comments
Open

Allow overriding of global variable default at the task level #2025

luiavila opened this issue Jan 27, 2025 · 0 comments
Labels
state: needs triage Waiting to be triaged by a maintainer.

Comments

@luiavila
Copy link

Description

Example situation:

By default, the global variable default should be used. If a task defines / attempts to override the default, it is currently not utilized.

version: '3'

vars:
  MY_VAR: '{{.MY_VAR | default 123}}'

tasks:
  MY_TASK:
    vars:
      MY_VAR: '{{.MY_VAR | default 456}}'
    cmds:
      - echo "MY_VAR = {{.MY_VAR}}"

Current output:

> task MY_TASK
MY_VAR = 123

> task MY_TASK MY_VAR=789
MY_VAR = 789
@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs triage Waiting to be triaged by a maintainer.
Projects
None yet
Development

No branches or pull requests

2 participants