From eb4de62bc1eaace0776ab0529960a1fef888fabf Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 27 Jul 2016 21:43:13 +0100 Subject: [PATCH 1/3] Remove incorrect message --- install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 86c6c70dd5..9fe8e4f2fd 100755 --- a/install.sh +++ b/install.sh @@ -40,7 +40,7 @@ nvm_source() { echo "$NVM_SOURCE_URL" } -# +# # Node.js version to install # nvm_node_version() { @@ -103,7 +103,6 @@ nvm_install_node() { NODE_VERSION="$(nvm_node_version)" if [ -z "$NODE_VERSION" ]; then - echo "=> You can now install Node.js by running \`nvm install\`" return 0 fi From 3417e9d9a350f805ea51784c63fc9063e1ae0187 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 27 Jul 2016 22:09:02 +0100 Subject: [PATCH 2/3] Add message explaining how to use nvm --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index 9fe8e4f2fd..64773466e9 100755 --- a/install.sh +++ b/install.sh @@ -297,6 +297,9 @@ nvm_do_install() { nvm_install_node nvm_reset + + echo "=> Close and reopen your terminal to start using nvm or run the following to use it now:" + printf "$SOURCE_STR" } # From 978f7b44351ccc6e6f645b1c89fbaceb109b2c05 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Wed, 27 Jul 2016 22:26:05 +0100 Subject: [PATCH 3/3] Only source nvm, not entire profile --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 64773466e9..f21d66c463 100755 --- a/install.sh +++ b/install.sh @@ -289,8 +289,8 @@ nvm_do_install() { fi fi - # Sourcing $PROFILE to take into account the new environment - . "$NVM_PROFILE" + # Source nvm + . "$NVM_DIR/nvm.sh" nvm_check_global_modules