dd5ca1b535d6ca5602ddbbb7d43afec8bb491ead
- Author
- Pavle Portic <git@theedgeofrage.com>
- Committer
- Pavle Portic <git@theedgeofrage.com>
- Date
Message
Only init pyenv if it is installed
Diff
1diff --git a/dot_zshrc b/dot_zshrc
2index 31bd40f666e47b71d146e9fb28a6f4cb95e89fe0..e578883b5694c35df7297e2007d538c6fed46e54 100644
3--- a/dot_zshrc
4+++ b/dot_zshrc
5@@ -84,10 +84,12 @@ export FZF_DEFAULT_OPTS='
6 export JQ_COLORS="1;31:0;35:0;35:0;39:0;32:1;39:1;39"
7
8 # Pyenv settings
9-export PYENV_ROOT="$HOME/.pyenv"
10-export PATH="$PYENV_ROOT/bin:$PATH"
11-eval "$(pyenv init --path)"
12-eval "$(pyenv init -)"
13+if which pyenv &> /dev/null; then
14+ export PYENV_ROOT="$HOME/.pyenv"
15+ export PATH="$PYENV_ROOT/bin:$PATH"
16+ eval "$(pyenv init --path)"
17+ eval "$(pyenv init -)"
18+fi
19
20 # Nvm settings
21 [[ -f /usr/share/nvm/init-nvm.sh ]] && source /usr/share/nvm/init-nvm.sh