From ceac620621b75aac9edb0a26d7ea7f0e426b528c Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Fri, 21 May 2021 08:15:34 -0400 Subject: [PATCH] Be better at preventing asdf init errors --- zsh/.zshrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 5124a1b..7c94f58 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -36,16 +36,19 @@ if which rbenv > /dev/null; then (rbenv rehash &) 2> /dev/null fi -# # init nodenv +# init nodenv if which nodenv > /dev/null; then eval "$(nodenv init --no-rehash -)" (nodenv rehash &) 2> /dev/null fi -if [ -d $HOME/.asdf ]; then +if [ -f $HOME/.asdf ]; then source $HOME/.asdf/asdf.sh fi -. ~/.asdf/plugins/java/set-java-home.zsh + +if [ -f $HOME/.asdf/plugins/java/set-java-home.zsh ]; then + source $HOME/.asdf/plugins/java/set-java-home.zsh +fi # init direnv if which direnv > /dev/null; then