-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Hi!
First of all, thanks a lot for a great tool, I can't say enough how I like it!
Now, to the ticket
-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
OS version and name: Arch Linux
-
Poetry version:
0.12.16 -
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/valignatev/c3776ec5677644e6a68534d77eb20c2b
Issue
When configuring virtualenvs.path in the ~/.config/pypoetry/config.toml with the tilde to specify (for example, ~/.virtualenvs, Poetry creates a ~/.virtualenws directories in the project root instead. More specifically, considering this project structure:
.
├── proj
│ └── __init__.py
├── poetry.lock
├── pyproject.toml
├── README.rst
└── tests
├── __init__.py
└── test_proj.py
When we do poetry install in the project root, it becomes this:
.
├── ~
│ └── .virtualenvs
├── proj
│ └── __init__.py
├── poetry.lock
├── pyproject.toml
├── README.rst
└── tests
├── __init__.py
└── test_proj.py
The contents of a config.toml:
[settings]
virtualenvs.path = "~/.virtualenvs"
[repositories]Absolute path in the virtualenvs.path works, of course.
I've found out why this happens. Here: https://github.com/sdispater/poetry/blob/master/poetry/utils/env.py#L202
Without the expanduser call, ~ will be treated like a regular directory name.
This should be pretty easy to fix, so I can submit a PR. I'm not sure though if adding a test would be easy as well, since I'm not very familliar with Poetry test suit yet :)
Let me know if I should do it. Or maybe for some reason you don't want to support ~/ paths :)