Re-use value of _answers-file #714
-
Hi all! I am experimenting with copier and I am really loving it! I have the following question: When you create a template and use the default answer file filename, I see the following happening when I run it:
When I rerun the same command, all questions that have been previously answered are filled in automatically (this is being parsed from the answers file). When I now change the copier.yml file and include the following _answers-file with a different filename, this results in
When I rerun the same command, it asks for all questions are asked and default values are filled in. When I supply an extra command line switch copier can read the answers:
It doesn't seem to pick up the answer file setting from the copier.yml when re-running the command. It would be great if copier would read the answers from the filename of the changed _answers-file setting. Is this possible or am I doing something wrong / missing something? If it is unclear, I will add a more elaborate example! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm not sure if I understand you correctly, but if you're wanting to use a different answers file name, then:
This is expected behaviour, because I can tell Copier what's the default value for an answers file, but once it's recorded, Copier cannot know which template are you updating unless you point it to an answers file (where that info is recorded). |
Beta Was this translation helpful? Give feedback.
I'm not sure if I understand you correctly, but if you're wanting to use a different answers file name, then:
copier.yml
if-a
is not used in the CLI.copier -a .custom-answers.yml update
This is expected behaviour, because I can tell Copier what's the default value for an answers file, but once it's recorded, Copier cannot know which template are you updating unless you point it to an answers file (where that info is recorded).