-
-
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
Empty required variable still passing the required check? #1676
Comments
Seems like the the code is only checking if the variable exists, not if it is also set. Expectation is that nil or "" (empty string) would cause such a variable to fail the requires checks. |
Documentation has this:
which is not so good. I really have to question that, both in what it means (what is an empty and zero length string), and if such behavior is even useful. The code behind variables is quite involved, so in many places you find variables being defaulted to an empty string (i.e. Again with the documentation:
which seems OK, but misses the use-cases where one task calls another with non-trivial variable passing, and included task files ... these are cases where I think the required checks should be:
In the case that 3 would not be accepted as part of the implementation, then we need a way to set a variable to |
Discussed in #1620
Originally posted by usersina April 26, 2024
v3.36.0
Arch Linux x86_64 6.6.28-1-lts
No
Given the following
Taskfile.yml
:My
check-missing
is not working as intended.Actual output
Expected output
This works as intended if I simply delete
CONTAINER_REGISTRY
or comment it out, but why isn't it working if it's empty?The text was updated successfully, but these errors were encountered: