-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Relative cache-dir
breaks the new installer
#3049
Comments
That should fix the specific issue. An additional fix may be to resolve the cache-dir value when it is loaded in. However, not sure if there would be any unintentional side-effects in doing so. |
Just came across this myself, on poetry version |
Are you guys going to open a PR for this? By the way, I'm using the relative paths as a workaround to |
I accidentally removed the Solved it by removing |
I was just with the same issue today |
Same thing in CI when setting cache directory with a relative path: https://github.com/pawamoy/duty/runs/2098788727?check_suite_focus=true |
I would love to have a way to make it relative to |
Here's how I worked around this in CI: env:
# To fix an error when running Poetry on Windows
# (https://github.com/python-poetry/poetry/issues/2629),
# we set Poetry's cache directory to .poetry_cache in the current directory.
# It makes it easier to later remove the virtualenv when it's broken.
# Absolute path is necessary to avoid this issue:
# https://github.com/python-poetry/poetry/issues/3049
POETRY_CACHE_DIR: ${{ github.workspace }}/.poetry_cache Damn it's hard to make things work on Windows. |
cache-dir
is relativecache-dir
breaks the new installer
Closing this, because I cannot reproduce this anymore. Feel free to leave a comment if you disagree. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: Linux Mint 20, Python 3.8.2
Poetry version: 1.1.0, master
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/matejcik/f7b0d6ca9bea9e6613f7a99433d7ad65
Issue
When
cache-dir
is set to a relative path (in poetry.toml), bad things happen.To reproduce:
poetry install
rm -r .venv
poetry install
againExpected result: this should work fine
Actual result: a spectacularly unhelpful stack trace with the following error:
ValueError: relative path can't be expressed as a file URI
after modifying something or other, the actual stack trace shows up:
Far as I could tell,
archive
above is a relative path starting with.cache
, which can't be converted to an URI.After changing the line in
chef.py
to:the issue goes away. I'm not sure if that is even the right place to fix it, but if yes, I'll send a PR.
The text was updated successfully, but these errors were encountered: