copier
copier copied to clipboard
non-iteractive mode
Is your feature request related to a problem? Please describe. When using Copier as a library, in case of missing answer, Copier with prompt for answers, while it might be impossible to get an an input. Same if CLI is used in an automated environment (e.g. automatic updates).
Describe the solution you'd like I'd like Copier accept a non-interactive flag, which would cause it to fail on a missing answer instead of asking for it.
Additional context I guess I should check the flag in this loop: https://github.com/copier-org/copier/blob/master/copier/main.py#L390
and add it for CLI somewhere here: https://github.com/copier-org/copier/blob/master/copier/cli.py#L80
We have defaults to avoid asking for unpassed answers.
Jinja has https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.Undefined .
Have you tried combining both?