-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Shouldn't _src_path
be stored as absolute path?
#335
Comments
That's not by design currently, but by accident. However it seems to be a good design, because if you share the project and you know that the template resides next to it in In any case, if you end up producing a copier-answers file, it means that you support updates. And the requirements for supporting updates is that your source template is a git repo with tags (otherwise there's no way to generate a smart diff, thus the update itself will be broken), so your use case is probably wrong by design anyway. There's still the possibility that it's a local git repo. In that case, I'm still not sure what'd be better... 🤔 |
I guess that if you generate it from a local path, the project is not supposed to be portable/used by someone else. If it must be portable, the template source should be an URL… otherwise it's probably only accessible by you anyway. It could be useful to have a command to change the template source… with "use at your own risk". BTW, is it safe to change that, just that, manually in the answers file? |
I think so. In any case, this is a real issue because even if we want relative paths, those should be relative to the project, not to the CWD. |
As it's a choice, there should be an option, right? Like
If that option is passed to
|
I ran into the same problem. |
If you want it to be an absolute path, you can pass it as an absolute path, right? Why do we need extra flags for that? |
When creating a project using a local path, shouldn't it be stored as absolute path in the
answers_file
?If created using
copier . /path/to/destination
, it's saved as_src_path: .
.One can do it "auto-manually" using
copier "$PWD" /path/to/destination
.The text was updated successfully, but these errors were encountered: