Prevent attempts to nvm use a circular reference.

This commit is contained in:
Jordan Harband committed 2014-10-22 18:15:21 -07:00
1 parent 9b91734f0b
commit 2d529cc8b7
2 files changed
+25

No files matched your search

+3
View File
@@ -821,6 +821,9 @@ nvm() {
echo "System version of node not found." >&2
return 127
fi
elif [ "_$VERSION" = "_∞" ]; then
echo "The alias \"$2\" leads to an infinite loop. Aborting." >&2
return 8
fi
local NVM_VERSION_DIR