Permalink
Browse files

Merge pull request #67 from mmalecki/already-installed

Don't allow installing already installed version.
  • Loading branch information...
2 parents 087ce15 + 33c9139 commit 273aeeee734199b93e828743f9c83772fdc1a739 @creationix creationix committed Sep 19, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 nvm.sh
View
3 nvm.sh
@@ -108,6 +108,9 @@ nvm()
fi
[ "$NOCURL" ] && curl && return
VERSION=`nvm_version $2`
+
+ [ -d "$NVM_DIR/$VERSION" ] && echo "$VERSION is already installed." && return
+
tarball=''
if [ "`curl -Is "http://nodejs.org/dist/$VERSION/node-$VERSION.tar.gz" | grep '200 OK'`" != '' ]; then
tarball="http://nodejs.org/dist/$VERSION/node-$VERSION.tar.gz"

0 comments on commit 273aeee

Please sign in to comment.