mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 22:41:16 +00:00
24 lines
576 B
Bash
Executable file
24 lines
576 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e
|
|
[ -n "$PYENV_DEBUG" ] && set -x
|
|
|
|
if [ -z "$PYENV_VERSION" ]; then
|
|
PYENV_VERSION_FILE="$(pyenv-version-file)"
|
|
IFS=: PYENV_VERSION=($(pyenv-version-file-read "$PYENV_VERSION_FILE" || true))
|
|
fi
|
|
|
|
if [ -z "$PYENV_VERSION" ] || [ "$PYENV_VERSION" = "system" ] ; then
|
|
echo "system"
|
|
exit
|
|
fi
|
|
|
|
for version in "${PYENV_VERSION[@]}"; do
|
|
PYENV_VERSION_PATH="${PYENV_ROOT}/versions/${version}"
|
|
|
|
if [ ! -d "$PYENV_VERSION_PATH" ]; then
|
|
echo "pyenv: version \`$version' is not installed" >&2
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
IFS=: echo "${PYENV_VERSION[*]}"
|