From 53cfd2dd9b55d77f58ce6453c3be8aa60827265c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caio=20Rom=C3=A3o?= Date: Wed, 18 Jan 2012 17:43:28 -0200 Subject: [PATCH 1/4] Avoid carrying over test status when no node version is installed When sourcing nvm.sh, if there are no version of node installed the command `nvm ls default` silentry fails, however it's return status code (`$?`) is still set to non-zero, which means an error. This patch simply avoids this issue by making sure the status code after sourcing is ok so that people that put the returned status codes in their command line prompt don't get an error every time `nvm.sh` is sourced. --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 6d589d8..831db6b 100755 --- a/nvm.sh +++ b/nvm.sh @@ -283,4 +283,4 @@ nvm() esac } -nvm ls default >/dev/null 2>&1 && nvm use default >/dev/null +nvm ls default &>/dev/null && nvm use default >/dev/null || true From a86262520ae5de585ed2cc9729c8eb782ebf0ded Mon Sep 17 00:00:00 2001 From: Wtfcoder Date: Tue, 13 Mar 2012 11:51:05 +0700 Subject: [PATCH 2/4] remove continue from curl arg. nodejs.org doesnt seems to support continue, CDN effect perhaps? --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 516f9a0..cbcec70 100755 --- a/nvm.sh +++ b/nvm.sh @@ -122,7 +122,7 @@ nvm() [ ! -z $tarball ] && \ mkdir -p "$NVM_DIR/src" && \ cd "$NVM_DIR/src" && \ - curl -C - --progress-bar $tarball -o "node-$VERSION.tar.gz" && \ + curl --progress-bar $tarball -o "node-$VERSION.tar.gz" && \ tar -xzf "node-$VERSION.tar.gz" && \ cd "node-$VERSION" && \ ./configure --prefix="$NVM_DIR/$VERSION" && \ From 1dbb7c799db0992de5d234ab3041aa7b5c2c2fca Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Wed, 17 Oct 2012 11:45:43 -0500 Subject: [PATCH 3/4] Update README.markdown --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index f8c186d..44474fd 100644 --- a/README.markdown +++ b/README.markdown @@ -124,7 +124,7 @@ If you try to install a node version and the installation fails, be sure to dele Where's my 'sudo node'? Checkout this link: - https://github.com/creationix/nvm/issues/43 +https://github.com/creationix/nvm/issues/43 on Arch Linux and other systems using python3 by default, before running *install* you need to From 7c2dfda88dbd87387f330d792fe91b61ad726596 Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Wed, 17 Oct 2012 16:47:24 +0000 Subject: [PATCH 4/4] Add ls-remote to autocomplete --- bash_completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash_completion b/bash_completion index e24b394..43ef607 100644 --- a/bash_completion +++ b/bash_completion @@ -19,7 +19,7 @@ __nvm_commands () COMMANDS='\ help install uninstall use\ - run ls list deactivate alias\ + run ls ls-remote list deactivate alias\ unalias copy-packages clear-cache version' if [ ${#COMP_WORDS[@]} == 4 ]; then