mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 21:22:38 +00:00
rewrite strip of PYENV_PREFIX_PATH in a single line
This commit is contained in:
parent
140808e3d4
commit
fd3dd225ba
1 changed files with 1 additions and 2 deletions
|
@ -31,8 +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/*}"
|
||||||
PYENV_PREFIX_PATH="${PYENV_PREFIX_PATH%/bin}"
|
|
||||||
else
|
else
|
||||||
PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"
|
PYENV_PREFIX_PATH="${PYENV_ROOT}/versions/${version}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue