alan-turing-institute / python-project-template

15 stars 3 forks source link

Check existence of project directory before setup #10

Closed yongrenjie closed 6 months ago

yongrenjie commented 10 months ago

I was silly enough to copy-paste

copier copy gh:alan-turing-institute/python-project-template /path/to/your/project

into my terminal without changing /path/to/your/project, and only after answering the questions did it complain that the directory didn't exist.

It would be nice if there was a way to perform this check earlier!

phinate commented 9 months ago

Agreed. Tracking in copier to see if there's a flag for this!

https://github.com/copier-org/copier/issues/1497

phinate commented 9 months ago

Ok, after messing around, I see that it's actually particular to the fact that this directory is read-only (were it to ever exist). The default behavior is to create the directory.

Maybe I'll just update the example string with an actually useful default directory name!