From 853afbf595e360dfe6471e2c55d28f0e4cdad3f9 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 26 Dec 2016 21:57:55 -0800 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"[Fix]=20`set=20-u`:=20ensur?= =?UTF-8?q?e=20that=20potentially=20unbound=20variables=20aren=E2=80=99t?= =?UTF-8?q?=20called=20unchecked.""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a8c465018e6c861f80ea7433be8118076e00178c. Fixes #1363. --- nvm.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index ad6b099..123aa53 100755 --- a/nvm.sh +++ b/nvm.sh @@ -379,7 +379,7 @@ nvm_remote_versions() { NVM_LS_REMOTE_PRE_MERGED_OUTPUT='' local NVM_LS_REMOTE_POST_MERGED_OUTPUT NVM_LS_REMOTE_POST_MERGED_OUTPUT='' - if [ -z "${NVM_FLAVOR}" ] || [ "${NVM_FLAVOR}" = "${NVM_NODE_PREFIX}" ]; then + if [ -z "${NVM_FLAVOR-}" ] || [ "${NVM_FLAVOR-}" = "${NVM_NODE_PREFIX}" ]; then local NVM_LS_REMOTE_OUTPUT NVM_LS_REMOTE_OUTPUT=$(NVM_LTS="${NVM_LTS-}" nvm_ls_remote "${PATTERN-}") &&: NVM_LS_REMOTE_EXIT_CODE=$? @@ -391,8 +391,8 @@ nvm_remote_versions() { local NVM_LS_REMOTE_IOJS_EXIT_CODE NVM_LS_REMOTE_IOJS_EXIT_CODE=0 local NVM_LS_REMOTE_IOJS_OUTPUT - if [ -z "${NVM_LTS}" ] && ( \ - [ -z "${NVM_FLAVOR}" ] || [ "${NVM_FLAVOR}" = "${NVM_IOJS_PREFIX}" ] \ + if [ -z "${NVM_LTS-}" ] && ( \ + [ -z "${NVM_FLAVOR-}" ] || [ "${NVM_FLAVOR-}" = "${NVM_IOJS_PREFIX}" ] \ ); then NVM_LS_REMOTE_IOJS_OUTPUT=$(nvm_ls_remote_iojs "${PATTERN-}") &&: NVM_LS_REMOTE_IOJS_EXIT_CODE=$? @@ -2406,6 +2406,7 @@ nvm() { fi local NVM_INSTALL_SUCCESS + NVM_INSTALL_SUCCESS=false if [ -n "${NVM_INSTALL_THIRD_PARTY_HOOK-}" ]; then nvm_err '** $NVM_INSTALL_THIRD_PARTY_HOOK env var set; dispatching to third-party installation method **' local NVM_METHOD_PREFERENCE