Modify nvm_version_path to use nvm_version_greater.

This commit is contained in:
Jordan Harband
2014-08-20 00:18:29 -07:00
parent 8fe677a644
commit 0a695c5d2a
2 changed files with 5 additions and 1 deletions

4
nvm.sh
View File

@@ -122,8 +122,10 @@ nvm_version_path() {
if [ -z "$VERSION" ]; then
echo "version is required" >&2
return 3
elif [ ! -z "$VERSION" ]; then
elif nvm_version_greater 0.12.0 "$VERSION"; then
echo "$(nvm_version_dir old)/$VERSION"
else
echo "$(nvm_version_dir new)/$VERSION"
fi
}