Merge pull request #88 from pwdtnx/fix-prefix-system

Fix pyenv-prefix to trim "/bin" in `pyenv prefix system`
This commit is contained in:
Yamashita, Yuu 2013-12-12 07:38:10 -08:00
commit 76bf3ee0d6

View file

@ -31,7 +31,7 @@ PYENV_PREFIX_PATHS=()
for version in "${versions[@]}"; do for version in "${versions[@]}"; do
if [ "$version" = "system" ]; then if [ "$version" = "system" ]; then
PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python || true)" PYTHON_PATH="$(PYENV_VERSION="${version}" pyenv-which python || true)"
PYENV_PREFIX_PATH="${PYTHON_PATH%/*}" PYENV_PREFIX_PATH="${PYTHON_PATH%/bin/*}"
else else
PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}" PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"
fi fi