guard asdf loading in .zshrc : no more errors when it is not installed

Generated by Mistral Vibe.
This commit is contained in:
hugogogo
2026-10-30 10:23:55 +01:00
parent 9a405a6fce
commit cbbc1789c0
+4 -2
View File
@@ -189,8 +189,10 @@ export NVM_DIR="$HOME/.nvm"
# its shims, which redirect each tool to the version chosen per project
# load asdf for every new zsh session
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
# (guarded like nvm : sources it only if installed, otherwise it would
# print an error in every new shell)
[ -s "$HOME/.asdf/asdf.sh" ] && . "$HOME/.asdf/asdf.sh"
[ -s "$HOME/.asdf/completions/asdf.bash" ] && . "$HOME/.asdf/completions/asdf.bash"
# ---------------------------------------------------------------------
# openJDK