diff --git a/dotfiles/lib/shellenv.sh b/dotfiles/lib/shellenv.sh index de7e2be0..fd0fe916 100644 --- a/dotfiles/lib/shellenv.sh +++ b/dotfiles/lib/shellenv.sh @@ -40,8 +40,6 @@ function _setup_env { # Load RVM into a shell session *as a function* [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" - _source_shellenv_files - function with_shellrc { zsh -c "source ~/.zshrc && ""$@" } @@ -49,9 +47,6 @@ function _setup_env { # Travis completion [ -f "$HOME/.travis/travis.sh" ] && source "$HOME/.travis/travis.sh" - test -e /usr/libexec/path_helper && eval `/usr/libexec/path_helper -s` - - export NVM_DIR="/Users/imalison/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm export NODE_PATH="/usr/local/lib/node_modules/" @@ -66,8 +61,11 @@ function _setup_env { export ENVIRONMENT_SETUP_DONE="$(date)" } -if [ -z ${ENVIRONMENT_SETUP_DONE+x} ]; then - _setup_env -else - _source_shellenv_files -fi +function _path_helper { + export PATH_HELPER_RAN="$(date)" + eval `/usr/libexec/path_helper -s` +} + +environment_variable_exists PATH_HELPER_RAN || _path_helper +environment_variable_exists ENVIRONMENT_SETUP_DONE || _setup_env +_source_shellenv_files