-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating the project creates a new .copier-answer.yml file #1617
Comments
_subdirectory: templates/vertex_batch
repo_id:
type: str
help: What is your repo name? That's a misuse IMO. You're trying to force the name of the output directory. It's confirmed by the fact that you put the copier-answers file into it, and only shows the contents of this
If you then update in this directory, which is not the root directory of the generated project, then the project gets generated again in a subdirectory of the project, in this case The solution is: don't try to force the name of the output directory. You can't: users will always, always be able to decide of their directory name. And you shouldn't: the directory name of a project shouldn't matter. Simply remove the
|
Ok I see, I didn't realise this was a misuse. I'm looking for a replacement for Cruft which allows the name of the output directory to be dynamic. Will move the copier-answers file to the root |
Thanks for your understanding 😄 You can advise your users to use |
Describe the problem
Hi, I have a project cloned from a local template. Both are version controlled with git. When I add a new file in my template and cd into my project and run
copier update
the project updates but creates a new.copier-answer.yml
file and adds the new file in the wrong location.Here's a visual of what's happening:
Original template structure:
Original project structure (the root of the template is at
templates/vertex_batch
):Original template structure with new file:
Updated project structure after running
copier upate
from the root of the project:My copier.yml:
Template
local template
To Reproduce
No response
Logs
No response
Expected behavior
The updating of the project should maintain the same structure as the template and there shouldn't add a new
.copier-answer.yml
file.Screenshots/screencasts/logs
No response
Operating system
macOS
Operating system distribution and version
Ventura 13.5
Copier version
9.2.0
Python version
CPython 3.10
Installation method
pipx+pypi
Additional context
No response
The text was updated successfully, but these errors were encountered: