mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-24 06:36:32 +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
|
fi
|
||||||
|
|
||||||
# NPM paths
|
# NPM paths
|
||||||
# On mac the path should already be taken care of
|
if type npm &> /dev/null ; then
|
||||||
if type npm &> /dev/null && [ $DET_OS != "mac" ]; then
|
|
||||||
# This seems to fail in some cases
|
# 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
|
fi
|
||||||
|
|
||||||
# Increase memory sizes for java using Ant
|
# Increase memory sizes for java using Ant
|
||||||
|
@ -31,7 +31,10 @@ end
|
|||||||
|
|
||||||
# NPM paths
|
# NPM paths
|
||||||
if type -q npm
|
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
|
end
|
||||||
|
|
||||||
# Add rust path
|
# Add rust path
|
||||||
|
Loading…
Reference in New Issue
Block a user