You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We created a project using this template named copier-project.
Then we updated the template to have another file named CONTRIBUTING.md inside the {{ repo_name }} folder, and updated the version of the template with its corresponding tag and all.
We then wanted to update the project copier-project created using this template. So within the folder copier-project we ran:
poetry run copier update --skip-tasks --skip-answered --trust --vcs-ref=HEAD .
Which updated the project with the message Updating to template version 0.2.7 and no errors.
However, we saw that the update command had created a new folder within copier-project named copier-project and had added the CONTRIBUTING.md file within this new folder, which completely breaks the structure of the project:
The template used is a private template and cannot be shared.
To Reproduce
No response
Logs
No response
Expected behavior
We would have expected that the CONTRIBUTING.md file to be added in the copier-project folder.
Screenshots/screencasts/logs
No response
Operating system
Linux
Operating system distribution and version
20.04
Copier version
9.4.1
Python version
3.11
Installation method
pip+pypi
Additional context
I have found that in here it specifies that for recursive templates one should use the _subdirectory option in configuration. However, we weren't able to add the {{ repo_folder }} as a _subdirectory directly, so we added the project folder to get around the problem. We do need to have tests for the template, have a separate pyproject.toml for the template, among other things, so that is why we can't use the root directly either.
The text was updated successfully, but these errors were encountered:
I believe that's the same issue as #1617, and I would therefore characterize it as "misuse". Can you check #1617 and tell us if that helps you solve your problem?
Describe the problem
We have a copier template that has the following structure (simplified):
The
copier.yml
file is:We created a project using this template named
copier-project
.Then we updated the template to have another file named
CONTRIBUTING.md
inside the{{ repo_name }}
folder, and updated the version of the template with its corresponding tag and all.We then wanted to update the project
copier-project
created using this template. So within the foldercopier-project
we ran:Which updated the project with the message
Updating to template version 0.2.7
and no errors.However, we saw that the update command had created a new folder within
copier-project
namedcopier-project
and had added theCONTRIBUTING.md
file within this new folder, which completely breaks the structure of the project:Template
The template used is a private template and cannot be shared.
To Reproduce
No response
Logs
No response
Expected behavior
We would have expected that the
CONTRIBUTING.md
file to be added in thecopier-project
folder.Screenshots/screencasts/logs
No response
Operating system
Linux
Operating system distribution and version
20.04
Copier version
9.4.1
Python version
3.11
Installation method
pip+pypi
Additional context
I have found that in here it specifies that for recursive templates one should use the
_subdirectory
option in configuration. However, we weren't able to add the{{ repo_folder }}
as a_subdirectory
directly, so we added theproject
folder to get around the problem. We do need to have tests for the template, have a separatepyproject.toml
for the template, among other things, so that is why we can't use the root directly either.The text was updated successfully, but these errors were encountered: