Skip to content
Myr

Revert "Revert "[Fix] `set -u`: ensure that potentially unbound variables aren’t called unchecked.""

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This reverts commit a8c465018e6c861f80ea7433be8118076e00178c. Fixes #1363.

authored by Jordan Harband · committed by Jordan Harband · parent a8c4650 · Browse files · 1 file+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:nvm.sh+4 added-3 removed
377 unmodified lines
378 local NVM_LS_REMOTE_PRE_MERGED_OUTPUT379 NVM_LS_REMOTE_PRE_MERGED_OUTPUT=''380 local NVM_LS_REMOTE_POST_MERGED_OUTPUT381 NVM_LS_REMOTE_POST_MERGED_OUTPUT=''382 if [ -z "${NVM_FLAVOR}" ] || [ "${NVM_FLAVOR}" = "${NVM_NODE_PREFIX}" ]; then382 if [ -z "${NVM_FLAVOR-}" ] || [ "${NVM_FLAVOR-}" = "${NVM_NODE_PREFIX}" ]; then383 local NVM_LS_REMOTE_OUTPUT384 NVM_LS_REMOTE_OUTPUT=$(NVM_LTS="${NVM_LTS-}" nvm_ls_remote "${PATTERN-}") &&:385 NVM_LS_REMOTE_EXIT_CODE=$?386 # split output into two
3 unmodified lines
390391 local NVM_LS_REMOTE_IOJS_EXIT_CODE392 NVM_LS_REMOTE_IOJS_EXIT_CODE=0393 local NVM_LS_REMOTE_IOJS_OUTPUT394 if [ -z "${NVM_LTS}" ] && ( \395 [ -z "${NVM_FLAVOR}" ] || [ "${NVM_FLAVOR}" = "${NVM_IOJS_PREFIX}" ] \394 if [ -z "${NVM_LTS-}" ] && ( \395 [ -z "${NVM_FLAVOR-}" ] || [ "${NVM_FLAVOR-}" = "${NVM_IOJS_PREFIX}" ] \396 ); then397 NVM_LS_REMOTE_IOJS_OUTPUT=$(nvm_ls_remote_iojs "${PATTERN-}") &&:398 NVM_LS_REMOTE_IOJS_EXIT_CODE=$?399 fi
2005 unmodified lines
2405 return $?2406 fi24072408 local NVM_INSTALL_SUCCESS2409 NVM_INSTALL_SUCCESS=false2410 if [ -n "${NVM_INSTALL_THIRD_PARTY_HOOK-}" ]; then2411 nvm_err '** $NVM_INSTALL_THIRD_PARTY_HOOK env var set; dispatching to third-party installation method **'2412 local NVM_METHOD_PREFERENCE2413 NVM_METHOD_PREFERENCE='binary'
872 unmodified lines