Actually correctly check for commands before using them
This commit is contained in:
parent
aebd6d0f3b
commit
7512827a65
2 changed files with 11 additions and 5 deletions
|
@ -11,7 +11,9 @@ fi
|
||||||
#export GTK_USE_PORTAL=1 # Try to use native file pickers in GTK programs
|
#export GTK_USE_PORTAL=1 # Try to use native file pickers in GTK programs
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Load pyenv
|
### Load pyenv
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
if command -v pyenv &> /dev/null; then
|
||||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
eval "$(pyenv init --path)"
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
|
eval "$(pyenv init -)"
|
||||||
|
fi
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
|
|
|
@ -7,8 +7,10 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
|
||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
fi
|
fi
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Load nvm (node version manager)
|
### Load nvm if script is in aur location
|
||||||
source /usr/share/nvm/init-nvm.sh
|
if [[ ! -f /usr/share/nvm/init-nvm.sh ]]; then
|
||||||
|
source /usr/share/nvm/init-nvm.sh
|
||||||
|
fi
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Add things to PATH
|
### Add things to PATH
|
||||||
path+=("$HOME/.pyenv/bin")
|
path+=("$HOME/.pyenv/bin")
|
||||||
|
@ -31,6 +33,8 @@ bindkey -e
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Load pyenv
|
### Load pyenv
|
||||||
if command -v pyenv &> /dev/null; then
|
if command -v pyenv &> /dev/null; then
|
||||||
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
fi
|
fi
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
|
|
Reference in a new issue