Skip to content

Prevent files from the root dir of the project being copied #1448

Answered by sisp
Steinkreis asked this question in Q&A
Discussion options

You must be logged in to vote

This is not how Copier works. See also #1322. Deriving the destination directory's name from a question is not possible with Copier, and in fact it shouldn't be because (a) a directory with the same name might already exist and (b) the local directory name doesn't matter – it's only local on your machine anyway and doesn't affect the remote repo's name/path. If Copier worked like that, applying multiple templates to the same destination directory wouldn't work.

Copier expects you to generate a project like this:

copier copy $src $dst

Whether $dst and {{project_name}} happen to be identical or not is your choice.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@Steinkreis
Comment options

@sisp
Comment options

sisp Dec 5, 2023
Collaborator

@Steinkreis
Comment options

@sisp
Comment options

sisp Dec 5, 2023
Collaborator

Answer selected by Steinkreis
Comment options

You must be logged in to vote
1 reply
@Steinkreis
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants