From 1a08edd94e554174dc52218396e0bd5f5a8a316f Mon Sep 17 00:00:00 2001 From: Kosei Moriyama Date: Sat, 24 Nov 2012 00:05:23 +0900 Subject: [PATCH 01/21] support platforms which does not have shasum command use sha1sum command if there is no shasum command --- nvm.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nvm.sh b/nvm.sh index bc42df2..6d3bed6 100755 --- a/nvm.sh +++ b/nvm.sh @@ -178,11 +178,16 @@ nvm() local url local sum local tarball + local shasum='shasum' if [ ! `which curl` ]; then echo 'NVM Needs curl to proceed.' >&2; fi + if [ ! `which shasum > /dev/null 2>&1` ]; then + shasum='sha1sum' + fi + if [ $# -lt 2 ]; then nvm help return @@ -216,7 +221,7 @@ nvm() mkdir -p "$NVM_DIR/bin/node-${t}" && \ cd "$NVM_DIR/bin" && \ curl -C - --progress-bar $url -o "node-${t}.tar.gz" && \ - nvm_checksum `shasum node-${t}.tar.gz | awk '{print $1}'` $sum && \ + nvm_checksum `${shasum} node-${t}.tar.gz | awk '{print $1}'` $sum && \ tar -xzf "node-${t}.tar.gz" -C "node-${t}" --strip-components 1 && \ mv "node-${t}" "../$VERSION" && \ rm -f "node-${t}.tar.gz" @@ -246,7 +251,7 @@ nvm() mkdir -p "$NVM_DIR/src" && \ cd "$NVM_DIR/src" && \ curl --progress-bar $tarball -o "node-$VERSION.tar.gz" && \ - if [ "$sum" = "" ]; then : ; else nvm_checksum `shasum node-$VERSION.tar.gz | awk '{print $1}'` $sum; fi && \ + if [ "$sum" = "" ]; then : ; else nvm_checksum `${shasum} node-$VERSION.tar.gz | awk '{print $1}'` $sum; fi && \ tar -xzf "node-$VERSION.tar.gz" && \ cd "node-$VERSION" && \ ./configure --prefix="$NVM_DIR/$VERSION" $ADDITIONAL_PARAMETERS && \ From 266284006408094065e8f5fceb4ee7bc602e97ff Mon Sep 17 00:00:00 2001 From: Marsup Date: Tue, 27 Nov 2012 23:46:04 +0100 Subject: [PATCH 02/21] Fix #172 on ZSH --- nvm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index bc42df2..45a39ce 100755 --- a/nvm.sh +++ b/nvm.sh @@ -74,6 +74,7 @@ nvm_ls() nvm_ls_remote() { local PATTERN=$1 + local VERSIONS if [ "$PATTERN" ]; then if echo "${PATTERN}" | grep -v '^v' ; then PATTERN=v$PATTERN @@ -81,7 +82,7 @@ nvm_ls_remote() else PATTERN=".*" fi - local VERSIONS=`curl -s http://nodejs.org/dist/ \ + VERSIONS=`curl -s http://nodejs.org/dist/ \ | egrep -o 'v[0-9]+\.[0-9]+\.[0-9]+' \ | grep -w "${PATTERN}" \ | sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n` From 2f6b0ca9d733832e0ee9c8761ed0d63ba4a150f4 Mon Sep 17 00:00:00 2001 From: Witold Szczerba Date: Tue, 4 Dec 2012 21:36:12 +0100 Subject: [PATCH 03/21] Update install.sh $HOME/.nvm used instead of introduced earlier NVM_TARGET. --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index ccdd0cb..1afa306 100755 --- a/install.sh +++ b/install.sh @@ -25,7 +25,7 @@ else fi fi -SOURCE_STR='[[ -s "$HOME/.nvm/nvm.sh" ]] && . "$HOME/.nvm/nvm.sh" # This loads NVM' +SOURCE_STR='[[ -s "$NVM_TARGET/nvm.sh" ]] && . "$NVM_TARGET/nvm.sh" # This loads NVM' if [ -z "$PROFILE" ] || [ ! -f "$PROFILE" ] ; then if [ -z $PROFILE ]; then From b063b326424003ee30d7a00a287029410e083ddd Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Tue, 4 Dec 2012 23:21:00 +0100 Subject: [PATCH 04/21] Added instructions for the install script --- README.markdown | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.markdown b/README.markdown index 44474fd..7d6be52 100644 --- a/README.markdown +++ b/README.markdown @@ -4,7 +4,22 @@ First you'll need to make sure your system has a c++ compiler. For OSX, XCode will work, for Ubuntu, the build-essential and libssl-dev packages work. -To install create a folder somewhere in your filesystem with the "`nvm.sh`" file inside it. I put mine in a folder called "`nvm`". +### Install script + +To install you could use the [install script](https://github.com/creationix/nvm/blob/master/install.sh) (requires Git) using cURL: + + curl https://raw.github.com/creationix/nvm/master/install.sh | sh + +or Wget: + + wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh + +The script clones the Nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile` or `~/.profile`). + + +### Manual install + +For manual install create a folder somewhere in your filesystem with the `nvm.sh` file inside it. I put mine in a folder called `nvm`. Or if you have `git` installed, then just clone it: @@ -14,7 +29,7 @@ To activate nvm, you need to source it from your bash shell . ~/nvm/nvm.sh -I always add this line to my ~/.bashrc or ~/.profile file to have it automatically sources upon login. +I always add this line to my `~/.bashrc` or `~/.profile` file to have it automatically sources upon login. Often I also put in a line to use a specific version of node. ## Usage @@ -23,7 +38,6 @@ To download, compile, and install the v0.6.14 release of node, do this: nvm install 0.6.14 - And then in any new shell just use the installed version: nvm use 0.6.14 From dc2bf8c526c859670d90e98e73d433ff9026eb16 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Tue, 4 Dec 2012 23:26:49 +0100 Subject: [PATCH 05/21] Fixed variable expansion for `SOURCE_STR` --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1afa306..234716f 100755 --- a/install.sh +++ b/install.sh @@ -25,7 +25,7 @@ else fi fi -SOURCE_STR='[[ -s "$NVM_TARGET/nvm.sh" ]] && . "$NVM_TARGET/nvm.sh" # This loads NVM' +SOURCE_STR="[[ -s "$NVM_TARGET/nvm.sh" ]] && . "$NVM_TARGET/nvm.sh" # This loads NVM" if [ -z "$PROFILE" ] || [ ! -f "$PROFILE" ] ; then if [ -z $PROFILE ]; then From 5596054445c8347d4b4e44af03e8fdb637945a1f Mon Sep 17 00:00:00 2001 From: "A.J" Date: Sun, 9 Dec 2012 05:17:13 +0900 Subject: [PATCH 06/21] fixed wrong condition checking for 'shasum' (I'm using Mac OS 10.8.2) line 188, `which shasum > /dev/null 2>&1` will be replaced by: '/usr/bin/shasum > /dev/null 2>&1' but, `/usr/bin/shasum` needs filename argument which is ommited and the test results always 'false'. --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 89db7ce..303925b 100755 --- a/nvm.sh +++ b/nvm.sh @@ -185,7 +185,7 @@ nvm() echo 'NVM Needs curl to proceed.' >&2; fi - if [ ! `which shasum > /dev/null 2>&1` ]; then + if [ -z "`which shasum`" ]; then shasum='sha1sum' fi From bc508802e5f535a4cac022484af1e6983cbe3d8d Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Wed, 12 Dec 2012 09:48:26 -0600 Subject: [PATCH 07/21] Update README.markdown --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 7d6be52..f989b1c 100644 --- a/README.markdown +++ b/README.markdown @@ -29,7 +29,7 @@ To activate nvm, you need to source it from your bash shell . ~/nvm/nvm.sh -I always add this line to my `~/.bashrc` or `~/.profile` file to have it automatically sources upon login. +I always add this line to my `~/.bashrc` or `~/.profile` file to have it automatically sourced upon login. Often I also put in a line to use a specific version of node. ## Usage From 1845a4a5a96007976604e2c6dfd059ba9b2b1c1e Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Sat, 12 Jan 2013 14:40:41 +0900 Subject: [PATCH 08/21] added the description about -s option. --- README.markdown | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.markdown b/README.markdown index f989b1c..c339281 100644 --- a/README.markdown +++ b/README.markdown @@ -144,3 +144,6 @@ on Arch Linux and other systems using python3 by default, before running *instal export PYTHON=python2 +After the v0.8.6 release of node, nvm try to install from binary package. But in some systems, official binary package doesn't work due to incompatibility of shared libs. In such cases, use `-s` option to force install from source: + + nvm install -s 0.8.6 From 881178db01ca83ad77cbff0ccfd776bac3acece1 Mon Sep 17 00:00:00 2001 From: Yosiya Hinosawa Date: Fri, 11 Jan 2013 19:33:44 +0900 Subject: [PATCH 09/21] fixed syntax error. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index c339281..aae2195 100644 --- a/README.markdown +++ b/README.markdown @@ -144,6 +144,6 @@ on Arch Linux and other systems using python3 by default, before running *instal export PYTHON=python2 -After the v0.8.6 release of node, nvm try to install from binary package. But in some systems, official binary package doesn't work due to incompatibility of shared libs. In such cases, use `-s` option to force install from source: +After the v0.8.6 release of node, nvm tries to install from binary package. But in some systems, official binary package doesn't work due to incompatibility of shared libs. In such cases, use `-s` option to force install from source: nvm install -s 0.8.6 From 7013372867ced186b763ca2f3640f7ee0c9908f2 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Sat, 12 Jan 2013 00:37:17 +0900 Subject: [PATCH 10/21] added -s (install from source) option. --- nvm.sh | 76 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 31 deletions(-) diff --git a/nvm.sh b/nvm.sh index 303925b..e15d0a3 100755 --- a/nvm.sh +++ b/nvm.sh @@ -151,7 +151,7 @@ nvm() echo echo "Usage:" echo " nvm help Show this message" - echo " nvm install Download and install a " + echo " nvm install [-s] Download and install a " echo " nvm uninstall Uninstall a version" echo " nvm use Modify PATH to use " echo " nvm run [] Run with as arguments" @@ -180,6 +180,7 @@ nvm() local sum local tarball local shasum='shasum' + local nobinary if [ ! `which curl` ]; then echo 'NVM Needs curl to proceed.' >&2; @@ -193,10 +194,20 @@ nvm() nvm help return fi - VERSION=`nvm_remote_version $2` + + shift + + nobinary=0 + if [ "$1" = "-s" ]; then + nobinary=1 + shift + fi + + VERSION=`nvm_remote_version $1` ADDITIONAL_PARAMETERS='' + shift - shift + while [ $# -ne 0 ] do ADDITIONAL_PARAMETERS="$ADDITIONAL_PARAMETERS $1" @@ -205,34 +216,37 @@ nvm() [ -d "$NVM_DIR/$VERSION" ] && echo "$VERSION is already installed." && return - # shortcut - try the binary if possible. - if [ -n "$os" ]; then - binavail= - # binaries started with node 0.8.6 - case "$VERSION" in - v0.8.[012345]) binavail=0 ;; - v0.[1234567]) binavail=0 ;; - *) binavail=1 ;; - esac - if [ $binavail -eq 1 ]; then - t="$VERSION-$os-$arch" - url="http://nodejs.org/dist/$VERSION/node-${t}.tar.gz" - sum=`curl -s http://nodejs.org/dist/$VERSION/SHASUMS.txt.asc | grep node-${t}.tar.gz | awk '{print $1}'` - if ( - mkdir -p "$NVM_DIR/bin/node-${t}" && \ - cd "$NVM_DIR/bin" && \ - curl -C - --progress-bar $url -o "node-${t}.tar.gz" && \ - nvm_checksum `${shasum} node-${t}.tar.gz | awk '{print $1}'` $sum && \ - tar -xzf "node-${t}.tar.gz" -C "node-${t}" --strip-components 1 && \ - mv "node-${t}" "../$VERSION" && \ - rm -f "node-${t}.tar.gz" - ) - then - nvm use $VERSION - return; - else - echo "Binary download failed, trying source." >&2 - cd "$NVM_DIR/bin" && rm -rf "node-${t}.tar.gz" "node-${t}" + # skip binary install if no binary option specified. + if [ $nobinary -ne 1 ]; then + # shortcut - try the binary if possible. + if [ -n "$os" ]; then + binavail= + # binaries started with node 0.8.6 + case "$VERSION" in + v0.8.[012345]) binavail=0 ;; + v0.[1234567]) binavail=0 ;; + *) binavail=1 ;; + esac + if [ $binavail -eq 1 ]; then + t="$VERSION-$os-$arch" + url="http://nodejs.org/dist/$VERSION/node-${t}.tar.gz" + sum=`curl -s http://nodejs.org/dist/$VERSION/SHASUMS.txt.asc | grep node-${t}.tar.gz | awk '{print $1}'` + if ( + mkdir -p "$NVM_DIR/bin/node-${t}" && \ + cd "$NVM_DIR/bin" && \ + curl -C - --progress-bar $url -o "node-${t}.tar.gz" && \ + nvm_checksum `${shasum} node-${t}.tar.gz | awk '{print $1}'` $sum && \ + tar -xzf "node-${t}.tar.gz" -C "node-${t}" --strip-components 1 && \ + mv "node-${t}" "../$VERSION" && \ + rm -f "node-${t}.tar.gz" + ) + then + nvm use $VERSION + return; + else + echo "Binary download failed, trying source." >&2 + cd "$NVM_DIR/bin" && rm -rf "node-${t}.tar.gz" "node-${t}" + fi fi fi fi From 278fd031b059057c329ed647b7219bec42927396 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Sat, 12 Jan 2013 13:30:12 +0900 Subject: [PATCH 11/21] added test for installation with -s option. --- test/slow/install from binary | 14 ++++++++++++++ test/slow/install from source | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 test/slow/install from binary create mode 100755 test/slow/install from source diff --git a/test/slow/install from binary b/test/slow/install from binary new file mode 100755 index 0000000..c22e0d8 --- /dev/null +++ b/test/slow/install from binary @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e +. ../../nvm.sh + +# Remove the stuff we're clobbering. +[ -e ../../v0.8.6 ] && rm -R ../../v0.8.6 + +# Install from binary +nvm install 0.8.6 + +# Check +[ -d ../../v0.8.6 ] +nvm run v0.8.6 --version | grep v0.8.6 diff --git a/test/slow/install from source b/test/slow/install from source new file mode 100755 index 0000000..d124b27 --- /dev/null +++ b/test/slow/install from source @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e +. ../../nvm.sh + +# Remove the stuff we're clobbering. +[ -e ../../v0.8.6 ] && rm -R ../../v0.8.6 + +# Install from source +nvm install -s 0.8.6 + +# Check +[ -d ../../v0.8.6 ] +nvm run v0.8.6 --version | grep v0.8.6 From 7dc0827eaa6ba363f4e072bc91ace80c3c0805c7 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Sat, 12 Jan 2013 13:59:28 +0900 Subject: [PATCH 12/21] minor modifications. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index aae2195..84479f4 100644 --- a/README.markdown +++ b/README.markdown @@ -144,6 +144,6 @@ on Arch Linux and other systems using python3 by default, before running *instal export PYTHON=python2 -After the v0.8.6 release of node, nvm tries to install from binary package. But in some systems, official binary package doesn't work due to incompatibility of shared libs. In such cases, use `-s` option to force install from source: +After the v0.8.6 release of node, nvm tries to install from binary packages. But in some systems, the official binary packages don't work due to incompatibility of shared libs. In such cases, use `-s` option to force install from source: nvm install -s 0.8.6 From 184f64173097a5169950bb39fb6d17516243c662 Mon Sep 17 00:00:00 2001 From: Yosiya Hinosawa Date: Sun, 13 Jan 2013 16:10:50 +0900 Subject: [PATCH 13/21] fixed the condition for the binary package availability. --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index e15d0a3..cc85e49 100755 --- a/nvm.sh +++ b/nvm.sh @@ -224,7 +224,7 @@ nvm() # binaries started with node 0.8.6 case "$VERSION" in v0.8.[012345]) binavail=0 ;; - v0.[1234567]) binavail=0 ;; + v0.[1234567].*) binavail=0 ;; *) binavail=1 ;; esac if [ $binavail -eq 1 ]; then From a6be969403f7d590f9c439d8450deac3199b48d6 Mon Sep 17 00:00:00 2001 From: Yosiya Hinosawa Date: Sun, 13 Jan 2013 16:13:20 +0900 Subject: [PATCH 14/21] changed shasums file url because in v0.8.6 .txt.asc file is not available. --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index cc85e49..65a0462 100755 --- a/nvm.sh +++ b/nvm.sh @@ -230,7 +230,7 @@ nvm() if [ $binavail -eq 1 ]; then t="$VERSION-$os-$arch" url="http://nodejs.org/dist/$VERSION/node-${t}.tar.gz" - sum=`curl -s http://nodejs.org/dist/$VERSION/SHASUMS.txt.asc | grep node-${t}.tar.gz | awk '{print $1}'` + sum=`curl -s http://nodejs.org/dist/$VERSION/SHASUMS.txt | grep node-${t}.tar.gz | awk '{print $1}'` if ( mkdir -p "$NVM_DIR/bin/node-${t}" && \ cd "$NVM_DIR/bin" && \ From 70e1b81ad3337cb0eb02fc13aa82ab98bcae8f83 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Mon, 21 Jan 2013 17:26:16 +0100 Subject: [PATCH 15/21] Add exit code, fix #190 --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 65a0462..e886883 100755 --- a/nvm.sh +++ b/nvm.sh @@ -351,7 +351,7 @@ nvm() VERSION=`nvm_version $2` if [ ! -d $NVM_DIR/$VERSION ]; then echo "$VERSION version is not installed yet" - return; + exit 1 fi if [[ $PATH == *$NVM_DIR/*/bin* ]]; then PATH=${PATH%$NVM_DIR/*/bin*}$NVM_DIR/$VERSION/bin${PATH#*$NVM_DIR/*/bin} From f605581c7d83cd73910e6978a863982906bad7c7 Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Mon, 21 Jan 2013 12:07:54 -0600 Subject: [PATCH 16/21] return not exit --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index e886883..fcf1189 100755 --- a/nvm.sh +++ b/nvm.sh @@ -351,7 +351,7 @@ nvm() VERSION=`nvm_version $2` if [ ! -d $NVM_DIR/$VERSION ]; then echo "$VERSION version is not installed yet" - exit 1 + return 1 fi if [[ $PATH == *$NVM_DIR/*/bin* ]]; then PATH=${PATH%$NVM_DIR/*/bin*}$NVM_DIR/$VERSION/bin${PATH#*$NVM_DIR/*/bin} From bc9c82cb9fa1dd13607b8d576a11f662980f16c5 Mon Sep 17 00:00:00 2001 From: GPad Date: Tue, 22 Jan 2013 13:28:13 +0100 Subject: [PATCH 17/21] read version from .nvmrc if not specified --- nvm.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/nvm.sh b/nvm.sh index fcf1189..05dccae 100755 --- a/nvm.sh +++ b/nvm.sh @@ -16,6 +16,14 @@ if [ ! -z "$(which unsetopt 2>/dev/null)" ]; then unsetopt nomatch 2>/dev/null fi +# Obtain nvm version from rc file +function rc_nvm_version { + if [ -e .nvmrc ]; then + RC_VERSION=`cat .nvmrc | head -n 1` + echo "Found .nvmrc files with version <$RC_VERSION>" + fi +} + # Expand a version using the version cache nvm_version() { @@ -348,6 +356,18 @@ nvm() nvm help return fi + if [ $# -eq 1 ]; then + rc_nvm_version + if [ ! -z $RC_VERSION ]; then + VERSION=`nvm_version $RC_VERSION` + fi + else + VERSION=`nvm_version $2` + fi + if [ -z $VERSION ]; then + nvm help + return + fi VERSION=`nvm_version $2` if [ ! -d $NVM_DIR/$VERSION ]; then echo "$VERSION version is not installed yet" From 7226e5fb9867545219e8979788a9e28b13c3450a Mon Sep 17 00:00:00 2001 From: GPad Date: Fri, 25 Jan 2013 19:13:40 +0100 Subject: [PATCH 18/21] read the .nvmrc if present --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 05dccae..10b153a 100755 --- a/nvm.sh +++ b/nvm.sh @@ -352,7 +352,7 @@ nvm() fi ;; "use" ) - if [ $# -ne 2 ]; then + if [ $# -eq 0 ]; then nvm help return fi From 205117bed46a31a5dbde56b659720f2ecfe306ee Mon Sep 17 00:00:00 2001 From: Christopher Roach Date: Fri, 1 Mar 2013 10:55:58 -0800 Subject: [PATCH 19/21] Fixes issue 199 Fixes issue 199 where the bash completion was not working in ZSH because the builtin bash command `complete` was not found. The fix executes the `bashcompinit` command which creates the `complete` function for the Z shell. --- bash_completion | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bash_completion b/bash_completion index 85b9eca..b3d4c25 100644 --- a/bash_completion +++ b/bash_completion @@ -79,4 +79,11 @@ __nvm () return 0 } +# complete is a bash builtin, but recent versions of ZSH come with a function +# called bashcompinit that will create a complete in ZSH. If the user is in +# ZSH, load and run bashcompinit before calling the complete function. +if [[ -n ${ZSH_VERSION-} ]]; then + autoload -U +X bashcompinit && bashcompinit +fi + complete -o default -o nospace -F __nvm nvm From 3ce23aa7267c233666dd81602c2b239411c6b347 Mon Sep 17 00:00:00 2001 From: Hugo Josefson Date: Mon, 4 Mar 2013 12:50:55 +0100 Subject: [PATCH 20/21] Recommend version 0.8 in README.markdown. Automatically install the latest available 0.8.x version. --- README.markdown | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.markdown b/README.markdown index 84479f4..4c76b21 100644 --- a/README.markdown +++ b/README.markdown @@ -34,17 +34,17 @@ Often I also put in a line to use a specific version of node. ## Usage -To download, compile, and install the v0.6.14 release of node, do this: +To download, compile, and install the latest v0.8.x release of node, do this: - nvm install 0.6.14 + nvm install 0.8 And then in any new shell just use the installed version: - nvm use 0.6.14 + nvm use 0.8 Or you can just run it: - nvm run 0.6.14 + nvm run 0.8 If you want to see what versions are available: @@ -56,7 +56,7 @@ To restore your PATH, you can deactivate it. To set a default Node version to be used in any new shell, use the alias 'default': - nvm alias default 0.6 + nvm alias default 0.8 ## License From e4acd639914d6f0d708e81c518251eb4bfdc510c Mon Sep 17 00:00:00 2001 From: Hugo Josefson Date: Mon, 4 Mar 2013 12:54:42 +0100 Subject: [PATCH 21/21] Clarify difference between `nvm ls` and `nvm ls-remote`. --- README.markdown | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 4c76b21..a85482f 100644 --- a/README.markdown +++ b/README.markdown @@ -46,10 +46,14 @@ Or you can just run it: nvm run 0.8 -If you want to see what versions are available: +If you want to see what versions are installed: nvm ls +If you want to see what versions are available to install: + + nvm ls-remote + To restore your PATH, you can deactivate it. nvm deactivate