.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:
parent
5682d144bb
commit
e50f65976e
7
.bashrc
7
.bashrc
@ -31,7 +31,12 @@ PROMPT_COMMAND="$TITLEBAR"
|
|||||||
ANSIBLE_HOSTS=hosts
|
ANSIBLE_HOSTS=hosts
|
||||||
|
|
||||||
# look for Node binaries in current directory
|
# look for Node binaries in current directory
|
||||||
PATH=$PATH:node_modules/.bin
|
# 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
|
# If a private bin directory exists, add it to PATH
|
||||||
[[ -d ~/bin ]] && PATH="$PATH:~/bin"
|
[[ -d ~/bin ]] && PATH="$PATH:~/bin"
|
||||||
|
Loading…
Reference in New Issue
Block a user