mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-12 05:23:47 -05:00
created new project.
modified rbenv source for Python and renamed to pyenv.
This commit is contained in:
22
libexec/pyenv-version-name
Executable file
22
libexec/pyenv-version-name
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
[ -n "$PYENV_DEBUG" ] && set -x
|
||||
|
||||
if [ -z "$PYENV_VERSION" ]; then
|
||||
PYENV_VERSION_FILE="$(pyenv-version-file)"
|
||||
PYENV_VERSION="$(pyenv-version-file-read "$PYENV_VERSION_FILE" || true)"
|
||||
fi
|
||||
|
||||
if [ -z "$PYENV_VERSION" ] || [ "$PYENV_VERSION" = "system" ]; then
|
||||
echo "system"
|
||||
exit
|
||||
fi
|
||||
|
||||
PYENV_VERSION_PATH="${PYENV_ROOT}/versions/${PYENV_VERSION}"
|
||||
|
||||
if [ -d "$PYENV_VERSION_PATH" ]; then
|
||||
echo "$PYENV_VERSION"
|
||||
else
|
||||
echo "pyenv: version \`$PYENV_VERSION' is not installed" >&2
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user