Add defensive check for unset PYENV_ROOT in init_dirs

This commit is contained in:
acoalson 2025-05-23 17:29:19 -07:00
parent 70b973fdd4
commit cdcdb5c68d

View File

@ -169,6 +169,11 @@ function help_() {
}
function init_dirs() {
if [ -z "$PYENV_ROOT" ]; then
echo 'Error: PYENV_ROOT is not set. Aborting.' >&2
exit 1
fi
mkdir -p "${PYENV_ROOT}/"{shims,versions}
}