-
I think I'm confused about how tasks work I added the following task which adds a dependency to the local _tasks:
- "{% if changesets %}npx add-dependencies --dev @changesets/cli{% endif %}" This is a partial template and it works fine on the first time I run However, when I try to The surprise is that the task is immediately executed, before copier even asks the questions. More importantly though, the command fails. The error is |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
When updating, Copier first regenerates a fresh project using the current template version, in a temporary folder. It executes the tasks in there, this is what you see in the output, even before the questions. Then it computes the diff between the fresh version and your current version. Then it updates your current project in-place with the new template version. Finally it reapplies the diff it computed earlier. See https://copier.readthedocs.io/en/latest/updating/#how-the-update-works |
Beta Was this translation helpful? Give feedback.
When updating, Copier first regenerates a fresh project using the current template version, in a temporary folder. It executes the tasks in there, this is what you see in the output, even before the questions. Then it computes the diff between the fresh version and your current version. Then it updates your current project in-place with the new template version. Finally it reapplies the diff it computed earlier. See https://copier.readthedocs.io/en/latest/updating/#how-the-update-works