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

feat: Avoid repeatedly adding virtual env to path variables #45

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

matthewfeickert
Copy link
Owner

Resolves #44

In the event that the virtual environment bin directory is already at the HEAD of PATH and the site-packages directory is already at the HEAD of PYTHONPATH don't repeatedly add them during cvmfs-venv-rebase. This can happen in the event where the cvmfs-venv virtual environment is activated and then a new shell is created, reataining the previous shell's environmental variables but not the activated virtual environment (i.e. deactivate will not be known in this shell).

@matthewfeickert matthewfeickert added the enhancement New feature or request label Nov 18, 2023
@matthewfeickert matthewfeickert self-assigned this Nov 18, 2023
* In the event that the virtual environment bin directory is already at
  the HEAD of PATH and the site-packages directory is already at the
  HEAD of PYTHONPATH don't repeatedly add them during cvmfs-venv-rebase.
  This can happen in the event where the cvmfs-venv virtual environment
  is activated and then a new shell is created, reataining the previous
  shell's environmental variables but not the activated virtual
  environment (i.e. `deactivate` will not be known in this shell).
@matthewfeickert matthewfeickert marked this pull request as ready for review November 18, 2023 07:28
@matthewfeickert matthewfeickert merged commit c049028 into main Nov 18, 2023
4 checks passed
@matthewfeickert matthewfeickert deleted the feat/rebase-at-activate branch November 18, 2023 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if need to strip the venv path at activate
1 participant