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

[feature request] negation for only_if #73

Open
TECHNOFAB11 opened this issue Dec 17, 2024 · 3 comments
Open

[feature request] negation for only_if #73

TECHNOFAB11 opened this issue Dec 17, 2024 · 3 comments

Comments

@TECHNOFAB11
Copy link

In your rust-cli template, there is a choice question for the license and another question for the author. I'd like to only ask for the author if a license was selected for my use case. But I cannot have more than one condition nor a way to negate them (not equals) I know of.
I don't know how the best UX would look like here, but probably the most straightforward way would be to add "operation" or something to Condition, which can then contain "equals" "not_equals" or so? 👍

@Keats
Copy link
Owner

Keats commented Dec 19, 2024

Maybe it could be unless = { name = "license", value = "None" }?

@TECHNOFAB11
Copy link
Author

TECHNOFAB11 commented Dec 19, 2024

Maybe it could be unless = { name = "license", value = "None" }?

That'd be fine for me too 👍

@Keats
Copy link
Owner

Keats commented Dec 20, 2024

I'm still thinking about it. It would be nice use containment and such. Maybe we could just use a Tera expression? Something like only_if = { expression = "license is defined" }. This way you can just use whatever you want from Tera

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants