Skip to content

Commit

Permalink
fix: PATH update for non-fish shells
Browse files Browse the repository at this point in the history
Checks PATH variable for existing inclusion of shims
for shells other than fish.

See PR #430
  • Loading branch information
keikoro committed Jan 14, 2024
1 parent 2b2b87a commit 4583d62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/pyenv-virtualenv-init
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ EOS
;;
* )
cat <<EOS
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
Expand Down

0 comments on commit 4583d62

Please sign in to comment.