.bashrc: Change npm test logic

The whole `if command ...` logic doesn't make sense to me, because
the command exits with 0 if it is successful, which means false!

This is just more readable anyways.

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-03-13 11:25:26 +03:00
parent 049c3600ef
commit c42a4edfd4
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

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