Skip to content
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

fix(virtualenv): improve virtual environment activation logic #204

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dannysteenman
Copy link

@dannysteenman dannysteenman commented Aug 27, 2024

This fix addresses an issue where virtual environments were not activating when opening a terminal directly in a project directory or restarting the shell e.g. exec zsh in the project directory.

for some reason when reloading the shell it would set the .venv bin below the regular python bin in $PATH. This added function will doublecheck if the .venv path is set on top when the shell reloads in the project directory containing the .venv

@hanslemm
Copy link

hanslemm commented Dec 9, 2024

@MichaelAquilina this fixes precisely what described, tested today for the same problem with VSCode terminals: the script didn't autoswitch without the fix that is proposed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants