From 9af7409e4aeaac0589707a1c604d13d070f25e27 Mon Sep 17 00:00:00 2001 From: Simon Tabor Date: Thu, 6 Feb 2014 13:02:57 +0000 Subject: [PATCH] don't curl if version is specified + installed Removes CURL to match the version pattern if an explicit version (e.g. `v0.10.25`) is specified and already installed. --- nvm.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nvm.sh b/nvm.sh index 272fc79..3381b40 100755 --- a/nvm.sh +++ b/nvm.sh @@ -240,6 +240,8 @@ nvm() { if [ "$os" = "freebsd" ]; then nobinary=1 fi + + [ -d "$NVM_DIR/$1" ] && echo "$1 is already installed." && return VERSION=`nvm_remote_version $1` ADDITIONAL_PARAMETERS=''