From 049c3600ef3869c2d150d615cafec28c9e1deb9e Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 13 Mar 2015 11:23:40 +0300 Subject: [PATCH] .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 --- .zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 4eeb03c..31b5bbb 100644 --- a/.zshrc +++ b/.zshrc @@ -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