-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
Task-level vars are ignored during 'requires' evaluation #1768
Comments
What is your use case for this? |
A variable, regardless of its scope, is resolved in the task's template. But "requires" does not resolve the scopes the same way.
If there is a disagreement, I would like to understand the scope and resolution logic of "requires", so that I do not misuse it. For reference, here is what the schema says: "A list of variables which should be set if this task is to run, if any of these variables are unset the task will error and not run" To me, the word "set" and "unset" is ambiguous. I thought a global variable can "set" that variable for the task. Clearly not the case right now. |
Taskfile.yml
When running
task echo
with this file, it succeeds:Since both variables are set, uncommenting
requires
should not change the behavior oftask echo
. However, it fails with the message:task: Task "echo" cancelled because it is missing required variables: TASK_LEVEL
. Task-level variable seems to be ignored during the evaluation ofrequires
.The text was updated successfully, but these errors were encountered: