[Fix] `set -u`: ensure `NVM_USE_OUTPUT` is always set.
Fixes #1671.
parent
7bfd1e0644
commit
a57fe846e8
3
nvm.sh
3
nvm.sh
|
@ -508,7 +508,7 @@ nvm_remote_versions() {
|
|||
local NVM_LS_REMOTE_IOJS_EXIT_CODE
|
||||
NVM_LS_REMOTE_IOJS_EXIT_CODE=0
|
||||
local NVM_LS_REMOTE_IOJS_OUTPUT
|
||||
NVM_LS_REMOTE_IOJS_OUTPUT=
|
||||
NVM_LS_REMOTE_IOJS_OUTPUT=''
|
||||
if [ -z "${NVM_LTS-}" ] && ( \
|
||||
[ -z "${NVM_FLAVOR-}" ] || [ "${NVM_FLAVOR-}" = "${NVM_IOJS_PREFIX}" ] \
|
||||
); then
|
||||
|
@ -2902,6 +2902,7 @@ nvm() {
|
|||
command rm -f "$NVM_DIR/current" && ln -s "$NVM_VERSION_DIR" "$NVM_DIR/current"
|
||||
fi
|
||||
local NVM_USE_OUTPUT
|
||||
NVM_USE_OUTPUT=''
|
||||
if [ $NVM_USE_SILENT -ne 1 ]; then
|
||||
if nvm_is_iojs_version "$VERSION"; then
|
||||
NVM_USE_OUTPUT="Now using io.js $(nvm_strip_iojs_prefix "$VERSION")$(nvm_print_npm_version)"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
set -eux
|
||||
|
||||
cleanup() {
|
||||
unset -f nvm_has_system_node nvm_print_npm_version
|
||||
|
|
Loading…
Reference in New Issue