2019-04-23 14:23:33 +00:00
|
|
|
#!/usr/bin/env bash
|
2013-01-18 08:41:41 +00:00
|
|
|
# Summary: Explain how the current Python version is set
|
2012-08-31 06:23:41 +00:00
|
|
|
set -e
|
|
|
|
[ -n "$PYENV_DEBUG" ] && set -x
|
|
|
|
|
2016-03-02 01:39:52 +00: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 06:23:41 +00:00
|
|
|
echo "PYENV_VERSION environment variable"
|
|
|
|
else
|
|
|
|
pyenv-version-file
|
|
|
|
fi
|