mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-16 15:33:51 -05:00
fix: PATH update for non-fish shells
Checks PATH variable for existing inclusion of shims for shells other than fish. See PR #430
This commit is contained in:
@@ -95,8 +95,10 @@ EOS
|
||||
;;
|
||||
* )
|
||||
cat <<EOS
|
||||
export PATH="${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims:\${PATH}";
|
||||
export PYENV_VIRTUALENV_INIT=1;
|
||||
if [[ ":$PATH:" != *"${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims"* ]]; then
|
||||
export PATH="${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims:\${PATH}";
|
||||
export PYENV_VIRTUALENV_INIT=1;
|
||||
fi
|
||||
EOS
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user