fix to proper echo of nvm which. Checkin test which had been left out

master
Daniel Bretoi 2014-12-02 12:58:07 -08:00
parent 234b925c7a
commit a1c0c34088
2 changed files with 7 additions and 1 deletions

2
nvm.sh
View File

@ -968,7 +968,7 @@ nvm() {
if [ "_$VERSION" = '_system' ]; then
if nvm_has_system_node >/dev/null 2>&1; then
echo $(dirname `which node`)
echo $(nvm use system && echo dirname $(which node))
return
else
echo "System version of node not found." >&2

View File

@ -0,0 +1,6 @@
#!/bin/sh
. ../../../nvm.sh
nvm which nonexistent_version
[ "$?" = "1" ]