From c1fc143ccbe49eb77da6648f3168018cdc1744e8 Mon Sep 17 00:00:00 2001 From: Junya Morioka Date: Tue, 8 Sep 2026 20:53:30 +0900 Subject: [PATCH] fix: answer new prompts when updating child repositories - Pass --defaults to copier update in the template distribution workflow; the license prompt added in #34 has no recorded answer in repositories generated before it, so Copier tried to ask interactively and the v2.0.0 run failed - Use the same flags in the template lifecycle CI job so the tested update path matches the one that reaches child repositories --- .github/workflows/test.yml | 4 +++- .github/workflows/trigger-template-update.yml | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 25f7e01..a584a3a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -133,7 +133,9 @@ jobs: git -C /tmp/test-copier-lifecycle commit -m "chore: initialize generated project" - name: Update to current template run: | - uvx copier update --vcs-ref HEAD --defaults /tmp/test-copier-lifecycle + # Same flags as .github/workflows/trigger-template-update.yml, so the + # tested update path matches the one used to reach child repositories. + uvx copier update --vcs-ref HEAD -A --defaults --trust /tmp/test-copier-lifecycle if git -C /tmp/test-copier-lifecycle diff --quiet; then echo "Copier update produced no changes" exit 1 diff --git a/.github/workflows/trigger-template-update.yml b/.github/workflows/trigger-template-update.yml index 231272c..ca87790 100644 --- a/.github/workflows/trigger-template-update.yml +++ b/.github/workflows/trigger-template-update.yml @@ -30,8 +30,10 @@ jobs: - name: Update template in child repository working-directory: child-repo run: | - # Update from template - uvx copier update -A --trust + # Update from template. --defaults answers prompts added since the + # child repository was last updated; without it Copier would try to + # ask interactively and fail. + uvx copier update -A --defaults --trust - name: Check for changes id: changes