From 2f40eeef2e201779b942c1c8bd241d058f5d2273 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 19 Nov 2021 08:53:43 -0800 Subject: [PATCH 1/3] [shellcheck] apply v0.8.0 updates --- install.sh | 2 +- nvm.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index c5bc50f..d6433ce 100755 --- a/install.sh +++ b/install.sh @@ -300,7 +300,7 @@ nvm_detect_profile() { nvm_check_global_modules() { local NPM_COMMAND NPM_COMMAND="$(command -v npm 2>/dev/null)" || return 0 - [ -n "${NVM_DIR}" ] && [ -z "${NPM_COMMAND%%$NVM_DIR/*}" ] && return 0 + [ -n "${NVM_DIR}" ] && [ -z "${NPM_COMMAND%%"$NVM_DIR"/*}" ] && return 0 local NPM_VERSION NPM_VERSION="$(npm --version)" diff --git a/nvm.sh b/nvm.sh index 72992c1..f65e991 100644 --- a/nvm.sh +++ b/nvm.sh @@ -634,7 +634,7 @@ nvm_remote_versions() { NVM_LS_REMOTE_EXIT_CODE=$? # split output into two NVM_LS_REMOTE_PRE_MERGED_OUTPUT="${NVM_LS_REMOTE_OUTPUT%%v4\.0\.0*}" - NVM_LS_REMOTE_POST_MERGED_OUTPUT="${NVM_LS_REMOTE_OUTPUT#$NVM_LS_REMOTE_PRE_MERGED_OUTPUT}" + NVM_LS_REMOTE_POST_MERGED_OUTPUT="${NVM_LS_REMOTE_OUTPUT#"$NVM_LS_REMOTE_PRE_MERGED_OUTPUT"}" fi local NVM_LS_REMOTE_IOJS_EXIT_CODE @@ -940,7 +940,7 @@ nvm_print_alias_path() { return 2 fi local ALIAS - ALIAS="${ALIAS_PATH##${NVM_ALIAS_DIR}\/}" + ALIAS="${ALIAS_PATH##"${NVM_ALIAS_DIR}"\/}" local DEST DEST="$(nvm_alias "${ALIAS}" 2>/dev/null)" ||: if [ -n "${DEST}" ]; then @@ -1186,7 +1186,7 @@ nvm_strip_iojs_prefix() { if [ "${1-}" = "${NVM_IOJS_PREFIX}" ]; then nvm_echo else - nvm_echo "${1#${NVM_IOJS_PREFIX}-}" + nvm_echo "${1#"${NVM_IOJS_PREFIX}"-}" fi } @@ -2614,7 +2614,7 @@ nvm_node_version_has_solaris_binary() { # Succeeds if $VERSION represents a version (node, io.js or merged) that has a # Solaris binary, fails otherwise. nvm_has_solaris_binary() { - local VERSION=$1 + local VERSION="${1-}" if nvm_is_merged_node_version "${VERSION}"; then return 0 # All merged node versions have a Solaris binary elif nvm_is_iojs_version "${VERSION}"; then From ccd98f7fcbae2a41ae4a00ab7ba50727732dd4b2 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 19 Nov 2021 08:59:37 -0800 Subject: [PATCH 2/3] [Dev Deps] update `doctoc` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c0630c6..dc3efd5 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "homepage": "https://github.com/nvm-sh/nvm", "devDependencies": { "dockerfile_lint": "^0.3.4", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "eclint": "^2.8.1", "markdown-link-check": "^3.8.7", "replace": "^1.2.1", From e9b26938b953278b0e6c0d1812e20267358f8f5e Mon Sep 17 00:00:00 2001 From: Ian Grayson Date: Mon, 15 Nov 2021 04:23:42 -0800 Subject: [PATCH 3/3] [readme] Describe another failure case for installing node versions from source on mac arm64 machines. It seems to be related to https://github.com/nodejs/node/issues/39313 (which describes a similar issue). --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8891021..658b704 100644 --- a/README.md +++ b/README.md @@ -913,6 +913,7 @@ Some issues you may encounter: $ NODE_OPTIONS="--max-old-space-size=4096" ./node_modules/.bin/your_node_package ``` - when using `nvm` to install some versions, the compilation fails +- after `nvm` successfully compiles some versions, `yarn` or `npm` may later fail to install packages with an `incorrect data check` error. One solution to this issue is to change the architecture of your shell from arm64 to x86.