mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-23 12:21:15 +00:00
15 lines
415 B
Text
15 lines
415 B
Text
|
#!/usr/bin/env bash
|
||
|
set -e
|
||
|
[ -n "$PYENV_DEBUG" ] && set -x
|
||
|
|
||
|
IFS=: PYENV_VERSION_NAMES=($(pyenv-version-name))
|
||
|
versions=("$@")
|
||
|
PYENV_VERSION_NAMES=("${PYENV_VERSION_NAMES[@]}" "${versions[@]}")
|
||
|
|
||
|
if [ -n "$PYENV_VERSION" ]; then
|
||
|
IFS=: PYENV_VERSION="${PYENV_VERSION_NAMES[*]}"
|
||
|
echo "export PYENV_VERSION=\"${PYENV_VERSION}\""
|
||
|
else
|
||
|
pyenv-version-file-write "$(pyenv-version-file)" "${PYENV_VERSION_NAMES[@]}"
|
||
|
fi
|