mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-24 04:36:28 +00:00
Only add npm path if it exists
This commit is contained in:
parent
7ec01997c1
commit
72d5ffaa4f
@ -66,10 +66,12 @@ elif [ -d "$HOME/.rvm" ]; then
|
||||
fi
|
||||
|
||||
# NPM paths
|
||||
# On mac the path should already be taken care of
|
||||
if type npm &> /dev/null && [ $DET_OS != "mac" ]; then
|
||||
if type npm &> /dev/null ; then
|
||||
# This seems to fail in some cases
|
||||
export PATH=$PATH:$(npm bin -g 2> /dev/null)
|
||||
npm_path=$(npm bin -g 2> /dev/null)
|
||||
if [ -d "$npm_path" ] && echo $PATH | grep -qv "$npm_path"; then
|
||||
export PATH=$npm_path:$PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase memory sizes for java using Ant
|
||||
|
@ -31,7 +31,10 @@ end
|
||||
|
||||
# NPM paths
|
||||
if type -q npm
|
||||
set -gx PATH (npm bin -g 2> /dev/null) $PATH
|
||||
set npm_path (npm bin -g 2> /dev/null)
|
||||
if [ -d "$npm_path" ]
|
||||
set -gx PATH $npm_path $PATH
|
||||
end
|
||||
end
|
||||
|
||||
# Add rust path
|
||||
|
Loading…
Reference in New Issue
Block a user