Don't auto-deactivate venv if it's not a project#210
Conversation
Check if $VIRTUAL_ENV is in vf lsprojects before deactivating. Moreover, the check: `not set -q VF_AUTO_ACTIVATED project_path` Doesn't seem to work as expected. Now these variables are checked separately.
|
One detail to add: This is still an imperfect solution. If I connect my project in a) switching into project directories with I think a more complete solution would require changes to the projects plugin where we could set something like a |
|
@cecep2: Many thanks for the fix. I don't recall the previous discussion, but I'm not opposed to us divining a more elegant solution at some point down the road. |
Uff, I just realized that #209 introduced a rather unfortunate bug: when I just want to activate a venv that is not connected to any project or has an activation file (
vf activate testvenv), #209 will immediately deactivate the venv when changing the directory (because it's not in$PROJECT_HOME). To fix this, I now also check if $VIRTUAL_ENV is invf lsprojects