question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shouldn't `_src_path` be stored as absolute path?

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lhupfeldtcommented, Jul 20, 2022

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 a file url), så maybe the _src_path should be renamed to _src_url?

0reactions
ppocommented, Feb 2, 2021

As it’s a choice, there should be an option, right?

Like --template-src="VALUE", where the value can be:

  • absolute
  • relative
  • the value to use

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 the template_src during creation and on the CWD during updates.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found