-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dvc: remove PATH prefixes appended by pyenv
Unlike PyInstaller, pyenv doesn't leave backups of original env vars when it modifies them. If we look into the shim, pyenv and pyenv-exec, we can figure out that the PATH is modified like this: PATH=$PYENV_BIN_PATH:${bin_path}:${plugin_bin}:$PATH where PYENV_BIN_PATH - starts with $PYENV_ROOT, see pyenv-exec source code. bin_path - might not start with $PYENV_ROOT as it runs realpath on it, see pyenv source code. plugin_bin - might contain more than 1 entry, which start with $PYENV_ROOT, see pyenv source code. So having this, we can make a rightful assumption about what parts of the PATH we need to remove in order to get the original PATH. Fixes #2506
- Loading branch information
Showing
2 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters