You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating a template where I am trying to use {{ _copier_conf.dst_path | basename }} to get the name of the repository that is rendering the template
When I copy the project intially, it gets correctly rendered as the repo name
However, when I run an update, it gets replaced with something like copier.main.new_copy.nstvyoqn
Is this by design or is this a bug?
I didn't find detailed documentation about dst_path, I see it's used in this example but I don't see it formally documented in the available settings
Expected behavior
I would like {{ _copier_conf.dst_path | basename }} to always be rendered as my destination repo name
Operating system
Linux
Operating system distribution and version
Ubuntu 22.04.3 LTS (running on WSL)
Copier version
9.4.1
Python version
3.10
Installation method
pipx+pypi
The text was updated successfully, but these errors were encountered:
It isn't advisable to use the dst_path variable in most cases because its value isn't stable as you noticed and even less so because the path might differ when you moved your local project directory to a different location or another developer cloned the project elsewhere. The example you linked to merely uses the dst_path variable in a message template; that's a different use case.
What's your use case? Does it happen to be related to #1839 and #1617? Are you migrating from Cookiecutter?
Describe the problem
I am creating a template where I am trying to use
{{ _copier_conf.dst_path | basename }}
to get the name of the repository that is rendering the templateWhen I copy the project intially, it gets correctly rendered as the repo name
However, when I run an update, it gets replaced with something like
copier.main.new_copy.nstvyoqn
Is this by design or is this a bug?
I didn't find detailed documentation about
dst_path
, I see it's used in this example but I don't see it formally documented in the available settingsExpected behavior
I would like
{{ _copier_conf.dst_path | basename }}
to always be rendered as my destination repo nameOperating system
Linux
Operating system distribution and version
Ubuntu 22.04.3 LTS (running on WSL)
Copier version
9.4.1
Python version
3.10
Installation method
pipx+pypi
The text was updated successfully, but these errors were encountered: