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

Disallow - in context variable names #995

Open
wolfv opened this issue Jul 30, 2024 · 1 comment
Open

Disallow - in context variable names #995

wolfv opened this issue Jul 30, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@wolfv
Copy link
Member

wolfv commented Jul 30, 2024

Since - is also the minus operator which will probably not work in jinja, we should forbid it in the left-hand side in the context, e.g.

context:
  foo-bar: baz

should trigger a parsing error.

@wolfv wolfv added the good first issue Good for newcomers label Jul 30, 2024
@Heidar-An
Copy link

Heidar-An commented Aug 3, 2024

Hey, I'd love to tackle this! Is this the correct place that I should be changing - https://github.com/prefix-dev/rattler-build/blob/main/src/recipe/parser.rs#L184-L193

Would adding something along the lines of "if k.contains("-") ... ERR" be correct?

Sorry for ping: @wolfv?

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

No branches or pull requests

2 participants