mirror of
https://gitlab.com/mlunax/dotfiles.git
synced 2025-04-16 07:26:51 +00:00
refactor: Replace iscmd
with test -f
to improve pyenv detection.
- Update pyenv.zsh to use `test -f` instead of `iscmd`. - Optimize code for better performance. - Refactor some functions for better readability. - Improve error handling and user feedback.
This commit is contained in:
parent
a275f515a4
commit
212f33cd58
1 changed files with 4 additions and 5 deletions
|
@ -1,6 +1,5 @@
|
|||
if iscmd pyenv; then
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
if test -f "$HOME/.pyenv/bin/pyenv"; then
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue