work like system which. show system node without changing to use it
parent
b3178ca925
commit
d1a90ca15c
4
nvm.sh
4
nvm.sh
|
@ -965,7 +965,7 @@ nvm() {
|
||||||
|
|
||||||
if [ "_$VERSION" = '_system' ]; then
|
if [ "_$VERSION" = '_system' ]; then
|
||||||
if nvm_has_system_node >/dev/null 2>&1; then
|
if nvm_has_system_node >/dev/null 2>&1; then
|
||||||
echo $(nvm use system && echo dirname $(which node))
|
echo $(nvm deactivate > /dev/null 2>&1 && echo $(which node))
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
echo "System version of node not found." >&2
|
echo "System version of node not found." >&2
|
||||||
|
@ -982,7 +982,7 @@ nvm() {
|
||||||
echo "$VERSION version is not installed yet" >&2
|
echo "$VERSION version is not installed yet" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
echo $NVM_DIR/$VERSION/bin
|
echo $NVM_DIR/$VERSION/bin/node
|
||||||
;;
|
;;
|
||||||
"alias" )
|
"alias" )
|
||||||
mkdir -p "$NVM_DIR/alias"
|
mkdir -p "$NVM_DIR/alias"
|
||||||
|
|
Loading…
Reference in New Issue