From 7161bb77362cb04d368c9a9a4b0081ff68fbeaad Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Sun, 11 Sep 2022 11:17:22 -0700 Subject: [PATCH] fix pyenv...again --- dotfiles/zsh/initializations.zsh | 15 ++++++++++++++- dotfiles/zsh/zprofile | 6 ------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dotfiles/zsh/initializations.zsh b/dotfiles/zsh/initializations.zsh index 3d9c154..830c483 100644 --- a/dotfiles/zsh/initializations.zsh +++ b/dotfiles/zsh/initializations.zsh @@ -1,7 +1,9 @@ #!/bin/zsh if [[ "$OSTYPE" == "linux-gnu" ]]; then - export PATH="$HOME/.pyenv/bin:$PATH" + export PATH=/usr/local/bin:$PATH + export PYENV_ROOT="$HOME/.pyenv" + export PATH="$PYENV_ROOT/bin:$PATH" # For whatever reason the linux version of pyenv doesnt install `pyenv-virtualenv-init`. eval "$(pyenv init -)" @@ -9,9 +11,20 @@ if [[ "$OSTYPE" == "linux-gnu" ]]; then fi if which pyenv-virtualenv-init > /dev/null; then + export PATH=/usr/local/bin:$PATH + export PYENV_ROOT="$HOME/.pyenv" + export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" fi + +if hash pyenv 2>/dev/null; then + export PYENV_ROOT="$HOME/.pyenv" + command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" +fi + + # RVM configuration [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" diff --git a/dotfiles/zsh/zprofile b/dotfiles/zsh/zprofile index bba9daf..3fff494 100644 --- a/dotfiles/zsh/zprofile +++ b/dotfiles/zsh/zprofile @@ -13,12 +13,6 @@ if [[ "$OSTYPE" == "darwin"* ]]; then export PATH="/usr/local/opt/tcl-tk/bin:$PATH" fi -if hash pyenv 2>/dev/null; then - export PYENV_ROOT="$HOME/.pyenv" - command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" - eval "$(pyenv init -)" -fi - export PATH=$HOME/bin:/usr/local/bin:$PATH test -r /home/vm/.opam/opam-init/init.sh && . /home/vm/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true