plugins/nodenv: use _command_exists

This commit is contained in:
John D Pell
2021-09-19 21:47:35 -07:00
parent f0179c79ce
commit b038ea5869
2 changed files with 5 additions and 1 deletions

View File

@@ -1,7 +1,10 @@
# shellcheck shell=bash
cite about-plugin
about-plugin 'load nodenv, if you are using it'
export NODENV_ROOT="$HOME/.nodenv"
pathmunge "$NODENV_ROOT/bin"
[[ `which nodenv` ]] && eval "$(nodenv init - bash)"
if _command_exists nodenv; then
eval "$(nodenv init - bash)"
fi