mirror of
https://gitlab.com/mlunax/dotfiles.git
synced 2025-04-19 08:45:36 +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
|
if test -f "$HOME/.pyenv/bin/pyenv"; then
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue