Shouldn't `_src_path` be stored as absolute path?
See original GitHub issueWhen 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
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
img tag not working with relative path in src - Stack Overflow
In my scenario, I just cannot work with absolute path. I have to use relative path. html · css · image · Share....
Read more >Absolute paths are included when using multiple directory ...
When using sources from multiple directories, the absolute path remains. ... In this scenario, javascript is stored under public/assets and ...
Read more >'posts' table should not store the absolute image path
Well, after a little research I realized that it is an (inconvenient) feature of Wordpress to store the absolute path of the images...
Read more >Relative and absolute paths, in the file system and on the web ...
Whereas relative path is tricky, and should be used with caution, only when you positively know where you are at the moment. Absolute...
Read more >Search paths in Ansible
Use absolute paths to tell Ansible where to find resources whenever you can. However, absolute paths are not always practical. This page covers...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I ran into the same problem. Storing the path relative to CWD (I got ‘.’) is not of much use. Storing the path as both relative to project and as absolute would be great, then the project could be moved, either independently from the template, or they could be moved together. Adding the
--template-src="VALUE"
is also a good idea. And yes, generally it is a URL (which can be afile
url), så maybe the_src_path
should be renamed to_src_url
?As it’s a choice, there should be an option, right?
Like
--template-src="VALUE"
, where the value can be:absolute
relative
If that option is passed to
update
, Copier uses that instead of_src_path
and the answers file is updated accordingly.absolute|relative
, are based on thetemplate_src
during creation and on the CWD during updates.