Skip to content
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

Document behavior of generating destination path when copying #1498

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ To generate a project from the template:
# Or "gl:" as a shortcut of "https://gitlab.com/"
run_copy("gl:copier-org/copier.git", "path/to/destination")
```
If `path/to/destination` doesn't exist, `copier` will create the directory in both cases.
phinate marked this conversation as resolved.
Show resolved Hide resolved

## Basic concepts

Expand Down
2 changes: 2 additions & 0 deletions docs/generating.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Or within Python code:
copier.run_copy("path/to/project/template", "path/to/destination")
```

If `path/to/destination` doesn't exist, `copier` will both create and populate the directory with the generated files. Note that this will raise an error if the destination is read-only.
phinate marked this conversation as resolved.
Show resolved Hide resolved

The "template" parameter can be a local path, an URL, or a shortcut URL:

- GitHub: `gh:namespace/project`
Expand Down