Use " quotes for $PYENV_ROOT in [[ -d ]] check

If a user sets `$PYENV_ROOT` to a path with ` ` (space) inside, the variable expansion might be not correct.

It is better to use explicit quoting.
This commit is contained in:
Nikita Sobolev 2024-06-22 12:33:17 +03:00 committed by GitHub
parent 756aad2613
commit 27f789dfef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -165,7 +165,7 @@ function help_() {
fi fi
echo echo
echo 'export PYENV_ROOT="$HOME/.pyenv"' echo 'export PYENV_ROOT="$HOME/.pyenv"'
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' echo '[[ -d "$PYENV_ROOT/bin" ]] && export PATH="$PYENV_ROOT/bin:$PATH"'
echo 'eval "$(pyenv init -)"' echo 'eval "$(pyenv init -)"'
;; ;;
esac esac