perf: remove unnecessary root variable, PYENV_ROOT already present.

This commit is contained in:
Christian Fredrik Johnsen 2024-12-11 00:34:43 +01:00
parent 38421ba6aa
commit 4ff5dbfe9b

View File

@ -60,8 +60,6 @@ if [ -z "$shell" ]; then
shell="${shell%%-*}" shell="${shell%%-*}"
fi fi
root="${0%/*}/.."
function main() { function main() {
case "$mode" in case "$mode" in
"help") "help")
@ -244,7 +242,7 @@ function print_env() {
} }
function print_completion() { function print_completion() {
completion="${root}/completions/pyenv.${shell}" completion="${PYENV_ROOT}/completions/pyenv.${shell}"
if [ -r "$completion" ]; then if [ -r "$completion" ]; then
echo "source '$completion'" echo "source '$completion'"
fi fi