.zshrc: 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:23:40 +03:00
parent 3eb6278ffe
commit 049c3600ef

3
.zshrc
View File

@ -43,7 +43,8 @@ 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 which npm >/dev/null 2>&1; then
command -v npm >/dev/null 2>&1
if [[ $? -eq 0 ]]; then
export PATH=$PATH:node_modules/.bin
fi