-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Allow configuring Jinja with StrictUndefined #1522
Comments
Would you like a PR for this? |
Of course. |
I'll start working on this now. |
@yajo Would it be acceptable to enable |
Makes sense to me, although that'd be a breaking change. WDYT @sisp? |
In general, I think By the way, #1170 would reduce the trouble of changing the default setting, but the current idea there is flawed. I've been thinking about a different approach, but this needs a proper PoC yet. |
Let's start by adding the option, and later the default. |
Discussed in https://github.com/orgs/copier-org/discussions/1512
Originally posted by coretl February 9, 2024
I've been bitten a couple of times by this workflow:
copier.yml
It would appear that Jinja does this by default, and the way it suggests to raise an error is by supplying
undefined=StrictUndefined
in itsEnvironment
. I tried this incopier.yml
:But it fails because it can't turn the string into a callable:
Is there a way to make the
copier copy
command fail if you use an undefined name in a template?Related to #313 but with a different aim in mind
The text was updated successfully, but these errors were encountered: