2012-08-31 02:23:41 -04:00
|
|
|
#!/usr/bin/env bash
|
2013-01-18 03:41:41 -05:00
|
|
|
# Summary: Explain how the current Python version is set
|
2012-08-31 02:23:41 -04:00
|
|
|
set -e
|
|
|
|
[ -n "$PYENV_DEBUG" ] && set -x
|
|
|
|
|
2016-03-01 20:39:52 -05:00
|
|
|
unset PYENV_VERSION_ORIGIN
|
|
|
|
|
|
|
|
OLDIFS="$IFS"
|
|
|
|
IFS=$'\n' scripts=(`pyenv-hooks version-origin`)
|
|
|
|
IFS="$OLDIFS"
|
|
|
|
for script in "${scripts[@]}"; do
|
|
|
|
source "$script"
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ -n "$PYENV_VERSION_ORIGIN" ]; then
|
|
|
|
echo "$PYENV_VERSION_ORIGIN"
|
|
|
|
elif [ -n "$PYENV_VERSION" ]; then
|
2012-08-31 02:23:41 -04:00
|
|
|
echo "PYENV_VERSION environment variable"
|
|
|
|
else
|
|
|
|
pyenv-version-file
|
|
|
|
fi
|