-
Notifications
You must be signed in to change notification settings - Fork 51
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
Confusion about condition statement #326
Comments
Besides,
gives |
Hmmm, but why
Above is in cargo-make. Using duckscript main I have the following result:
|
It seems |
sorry for the confusion, but conditions like in 'if' command are build either from
in your case, i figure you think you have a condition, but a condition is defined by "A condition statement is made up of values, or/and keywords and '('/')' groups." the 'not' is not a condition keyword, its also a command: which i guess where the confusion is coming from. so you need to do a = get_env ...
b = get_env ...
not_a = not ${a}
if ${not_a} and ${b}
...
else
...
end |
Yes, thanks for your answer and I’ve already fixed my problem in this way. I don’t have strong opinion, and haven’t learned much about the design decisions of duckscript. Do you think make “not” a condition keyword can be more user-friendly? |
conditions are not part of duckscript. they are commands on their own. |
Describe The Bug
gets error
To Reproduce
Error Stack
The error stack trace
Code Sample
/// paste code here
The text was updated successfully, but these errors were encountered: