You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by coretl February 9, 2024
I've been bitten a couple of times by this workflow:
Change the name of a variable in copier.yml
Forget to rename some of the references to that variable in my template
End up with that variable being rendered blank in a text file somewhere when using the template
It would appear that Jinja does this by default, and the way it suggests to raise an error is by supplying undefined=StrictUndefined in its Environment. I tried this in copier.yml:
_envops:
undefined: StrictUndefined
But it fails because it can't turn the string into a callable:
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: