Open NeilGirdhar opened 3 weeks ago
@NeilGirdhar not sure I follow the issue. Would you mind elaborating a bit more? I'm wondering what test case we can add to prevent regressions
@MichaelAquilina Thanks for taking a look!
The problem occurs when you switch directly from one venv to another. Normally, this tool won't deactivate the old environment and activate the new one (at least for me). So, I would have to do:
❯ cd tjax
Switching virtualenv: .venv [🐍Python 3.12.3]
❯ cd ..
Deactivating: .venv
❯ cd efax
Switching virtualenv: .venv [🐍Python 3.12.4]
❯
If I try to go directly, it does:
❯ cd tjax
Switching virtualenv: .venv [🐍Python 3.12.3]
❯ cd ../efax
❯
It doesn't switch.
ah I think now I get what you're saying - if the virtualenv name is the same (in this case .venv
, the reactivation does not happen?
Could I ask how you got those virtual environments setup in the first place so that I can reproduce a scenario and write tests for it?
ah I think now I get what you're saying - if the virtualenv name is the same (in this case .venv, the reactivation does not happen?
Exactly!
Could I ask how you got those virtual environments setup in the first place so that I can reproduce a scenario and write tests for it?
A virtual environment for a Python project will get the name .venv
if it's set up by uv sync
or poetry install
with [virtualenvs] in-project = true
.
Without this change, venv-name is '.venv' for both directories.