diff --git a/.bashrc b/.bashrc index 778da48..665e42c 100644 --- a/.bashrc +++ b/.bashrc @@ -37,8 +37,9 @@ export ANSIBLE_HOSTS=hosts # if we have npm, we probably want to use npm binaries # I don't like installing globally (npm -g), so add local # node modules' bin to PATH -if test $(which npm >/dev/null 2>&1); then - PATH=$PATH:node_modules/.bin +command -v npm >/dev/null 2>&1 +if [[ $? -eq 0 ]]; then + export PATH=$PATH:node_modules/.bin fi # Enable pyenv