Skip to content

Commit bb70576

Browse files
authored
Merge pull request #40 from mjun0812/fix/child-update-non-interactive
fix: answer new prompts when updating child repositories
2 parents 5eec2e3 + c1fc143 commit bb70576

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ jobs:
133133
git -C /tmp/test-copier-lifecycle commit -m "chore: initialize generated project"
134134
- name: Update to current template
135135
run: |
136-
uvx copier update --vcs-ref HEAD --defaults /tmp/test-copier-lifecycle
136+
# Same flags as .github/workflows/trigger-template-update.yml, so the
137+
# tested update path matches the one used to reach child repositories.
138+
uvx copier update --vcs-ref HEAD -A --defaults --trust /tmp/test-copier-lifecycle
137139
if git -C /tmp/test-copier-lifecycle diff --quiet; then
138140
echo "Copier update produced no changes"
139141
exit 1

‎.github/workflows/trigger-template-update.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ jobs:
3030
- name: Update template in child repository
3131
working-directory: child-repo
3232
run: |
33-
# Update from template
34-
uvx copier update -A --trust
33+
# Update from template. --defaults answers prompts added since the
34+
# child repository was last updated; without it Copier would try to
35+
# ask interactively and fail.
36+
uvx copier update -A --defaults --trust
3537
3638
- name: Check for changes
3739
id: changes

0 commit comments

Comments
 (0)