Merge branch 'nvm-sh:master' into man-pages

This commit is contained in:
Ian Harris 2021-11-19 18:40:44 -08:00 committed by GitHub
commit dac6b29036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 6 deletions

View File

@ -913,6 +913,7 @@ Some issues you may encounter:
$ NODE_OPTIONS="--max-old-space-size=4096" ./node_modules/.bin/your_node_package $ NODE_OPTIONS="--max-old-space-size=4096" ./node_modules/.bin/your_node_package
``` ```
- when using `nvm` to install some versions, the compilation fails - 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. One solution to this issue is to change the architecture of your shell from arm64 to x86.

View File

@ -300,7 +300,7 @@ nvm_detect_profile() {
nvm_check_global_modules() { nvm_check_global_modules() {
local NPM_COMMAND local NPM_COMMAND
NPM_COMMAND="$(command -v npm 2>/dev/null)" || return 0 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 local NPM_VERSION
NPM_VERSION="$(npm --version)" NPM_VERSION="$(npm --version)"

8
nvm.sh
View File

@ -634,7 +634,7 @@ nvm_remote_versions() {
NVM_LS_REMOTE_EXIT_CODE=$? NVM_LS_REMOTE_EXIT_CODE=$?
# split output into two # split output into two
NVM_LS_REMOTE_PRE_MERGED_OUTPUT="${NVM_LS_REMOTE_OUTPUT%%v4\.0\.0*}" 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 fi
local NVM_LS_REMOTE_IOJS_EXIT_CODE local NVM_LS_REMOTE_IOJS_EXIT_CODE
@ -940,7 +940,7 @@ nvm_print_alias_path() {
return 2 return 2
fi fi
local ALIAS local ALIAS
ALIAS="${ALIAS_PATH##${NVM_ALIAS_DIR}\/}" ALIAS="${ALIAS_PATH##"${NVM_ALIAS_DIR}"\/}"
local DEST local DEST
DEST="$(nvm_alias "${ALIAS}" 2>/dev/null)" ||: DEST="$(nvm_alias "${ALIAS}" 2>/dev/null)" ||:
if [ -n "${DEST}" ]; then if [ -n "${DEST}" ]; then
@ -1186,7 +1186,7 @@ nvm_strip_iojs_prefix() {
if [ "${1-}" = "${NVM_IOJS_PREFIX}" ]; then if [ "${1-}" = "${NVM_IOJS_PREFIX}" ]; then
nvm_echo nvm_echo
else else
nvm_echo "${1#${NVM_IOJS_PREFIX}-}" nvm_echo "${1#"${NVM_IOJS_PREFIX}"-}"
fi 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 # Succeeds if $VERSION represents a version (node, io.js or merged) that has a
# Solaris binary, fails otherwise. # Solaris binary, fails otherwise.
nvm_has_solaris_binary() { nvm_has_solaris_binary() {
local VERSION=$1 local VERSION="${1-}"
if nvm_is_merged_node_version "${VERSION}"; then if nvm_is_merged_node_version "${VERSION}"; then
return 0 # All merged node versions have a Solaris binary return 0 # All merged node versions have a Solaris binary
elif nvm_is_iojs_version "${VERSION}"; then elif nvm_is_iojs_version "${VERSION}"; then

View File

@ -41,7 +41,7 @@
"homepage": "https://github.com/nvm-sh/nvm", "homepage": "https://github.com/nvm-sh/nvm",
"devDependencies": { "devDependencies": {
"dockerfile_lint": "^0.3.4", "dockerfile_lint": "^0.3.4",
"doctoc": "^2.0.1", "doctoc": "^2.1.0",
"eclint": "^2.8.1", "eclint": "^2.8.1",
"markdown-link-check": "^3.8.7", "markdown-link-check": "^3.8.7",
"replace": "^1.2.1", "replace": "^1.2.1",