-
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
virtualenv.in-project=true has no effect if project has an existing virtualenv #6666
Comments
I assume we need to log out a warning like this? Warning: The virtualenvs.in-project is set to true in your project, but we already have a virtual environment from before. Your configuration will be ignored for now. If you would like to immediately apply this setting. You can modify the available virtual environments and set which one to use. See poetry list env. You might also want to use poetry env remove. |
This feels like it's more user interface than anything else (which is not my area). In my mind, having a warning printed will just get ignored most of the time. Maybe it's best to fail the config change if there are any envs, with an error? |
Would this be up for grabs? |
This behavior is intended, otherwise all venv's of Poetry project in the systems needs to be recreated if one changes the config. A clarification in the docs about it should be sufficient. |
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. |
-vvv
option) and have included the output below.Issue
virtualenvs.path
will always takes precedence once a project's virtualenv has been initialised under{cache-dir}/virtualenvs
.This means you can only convert to using
virtualenvs.in-project
if the original virtualenv directory is deleted - just settingvirtualenvs.in-project
to true is not enough.This is likely intended, however it can be a bit misleading if you're unfamiliar with Poetry. It would be nice if something like the following output was displayed when adding packages -
Installing package to /path/to/exmaple-project/virtualenv
EDIT: I just realised the above is provided when using -v. Might still be nice to provide it by default though?
Steps -
virtualenvs.in-project
unsetvirtualenvs.in-project
totrue
The text was updated successfully, but these errors were encountered: