From 63950957673856575baebcf2430770200d90b7af Mon Sep 17 00:00:00 2001 From: Daniel Elsner Date: Thu, 2 Apr 2026 09:38:16 +0200 Subject: [PATCH] docs: Improve docs on changing copier answers --- README.md | 8 +++++++- template/{{ _copier_conf.answers_file }}.jinja | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index afc39c2..3c21a10 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,14 @@ pixi exec --spec copier --spec ruamel.yaml -- copier copy --trust https://github To update to a newer template version: ```bash -pixi exec --spec copier --spec ruamel.yaml -- copier update --defaults --trust +pixi exec --spec copier --spec ruamel.yaml -- copier update --defaults --trust . ``` Note that copier will show `Conflict` for files that have manual changes. This is normal. As long as there are no merge conflict markers in the files all patches applied cleanly. + +If you want to change any answer that you gave before, run: + +```bash +pixi exec --spec copier --spec ruamel.yaml -- copier update --trust --defaults --vcs-ref=:current: --data answer_name=answer_value . +``` diff --git a/template/{{ _copier_conf.answers_file }}.jinja b/template/{{ _copier_conf.answers_file }}.jinja index 447d48c..55f6236 100644 --- a/template/{{ _copier_conf.answers_file }}.jinja +++ b/template/{{ _copier_conf.answers_file }}.jinja @@ -1,2 +1,11 @@ # This file is managed by Copier; DO NOT EDIT OR REMOVE. +# +# If you want to change any of the copier answers, run one of the following: +# 1. If you want to answer _all_ questions again: +# `copier update --trust --vcs-ref=:current: .` +# 2. If you want to answer a _specific_ question again: +# `copier update --trust --defaults --vcs-ref=:current: --data answer_name=answer_value .` +# +# If you want to run this as a one-off command, prefix with: +# `pixi exec --spec copier --spec ruamel.yaml -- {command}` {{ _copier_answers|to_nice_yaml -}}