Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
remove pyenv-pip-rehash/libexec from PATH to avoid infinite loops…
Browse files Browse the repository at this point in the history
… in `pyenv-which` (pyenv/pyenv#146)
Yamashita Yuu committed Mar 26, 2014
1 parent 9b2fed9 commit 2bb20a0
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libexec/easy_install
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
set -e
[ -n "$PYENV_DEBUG" ] && set -x

# Remove pyenv-pip-rehash/libexec from PATH to avoid infinite loops in `pyenv-which` (yyuu/pyenv#146)
_PATH=":${PATH}:"
_HERE="$(dirname "${BASH_SOURCE[0]}")" # remove this from PATH
_PATH="${_PATH//:${_HERE}:/:}"
_PATH="${_PATH#:}"
_PATH="${_PATH%:}"
PATH="${_PATH}"

PYENV_COMMAND_PATH="$(pyenv-which "$(basename "$0")")"
PYENV_BIN_PATH="${PYENV_COMMAND_PATH%/*}"

8 changes: 8 additions & 0 deletions libexec/pip
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
set -e
[ -n "$PYENV_DEBUG" ] && set -x

# Remove pyenv-pip-rehash/libexec from PATH to avoid infinite loops in `pyenv-which` (yyuu/pyenv#146)
_PATH=":${PATH}:"
_HERE="$(dirname "${BASH_SOURCE[0]}")" # remove this from PATH
_PATH="${_PATH//:${_HERE}:/:}"
_PATH="${_PATH#:}"
_PATH="${_PATH%:}"
PATH="${_PATH}"

PYENV_COMMAND_PATH="$(pyenv-which "$(basename "$0")")"
PYENV_BIN_PATH="${PYENV_COMMAND_PATH%/*}"

0 comments on commit 2bb20a0

Please sign in to comment.