This repository has been archived on 2024-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
asdf-python/bin/get-version-from-legacy-file

13 lines
335 B
Bash
Executable file

#!/usr/bin/env bash
get_legacy_version() {
local current_directory="$1"
local python_version_file="$current_directory/.python-version"
# Get version from .python-version file. .python-version is used by pyenv
if [ -f "$python_version_file" ]; then
cat "$python_version_file"
fi
}
get_legacy_version "$1"