.bashrc: Only add node binaries to path if we have npm

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2014-10-05 14:34:47 +03:00
parent 5682d144bb
commit e50f65976e
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -31,7 +31,12 @@ PROMPT_COMMAND="$TITLEBAR"
ANSIBLE_HOSTS=hosts
# look for Node binaries in current directory
# 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); then
PATH=$PATH:node_modules/.bin
fi
# If a private bin directory exists, add it to PATH
[[ -d ~/bin ]] && PATH="$PATH:~/bin"