Skip to content
Myr

[Refactor] `nvm install`: remove unused `REINSTALL_PACKAGES_FROM` argument to inner installation helpers.

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

authored by Jordan Harband · committed by Jordan Harband · parent 08cbcf2 · Browse files · 1 file+3 added−9 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+3 added−9 removed

  • other:+3 added−9 removed

1 file+3 added−9 removed

modified:nvm.sh+3 added-9 removed
1347 unmodified lines
1348 return 41349 fi1350 local VERSION1351 VERSION="${2}"1352 local REINSTALL_PACKAGES_FROM1353 REINSTALL_PACKAGES_FROM="${3}"13521353 if ! nvm_is_merged_node_version "${VERSION}" || nvm_is_iojs_version "${VERSION}"; then1354 nvm_err 'nvm_install_merged_node_binary requires a node version v4.0 or greater.'1355 return 10
68 unmodified lines
1424 return 41425 fi1426 local PREFIXED_VERSION1427 PREFIXED_VERSION="$2"1430 local REINSTALL_PACKAGES_FROM1431 REINSTALL_PACKAGES_FROM="$3"14281429 if ! nvm_is_iojs_version "$PREFIXED_VERSION"; then1430 nvm_err 'nvm_install_iojs_binary requires an iojs-prefixed version.'1431 return 10
56 unmodified lines
14881489nvm_install_node_binary() {1490 local VERSION1491 VERSION="$1"1496 local REINSTALL_PACKAGES_FROM1497 REINSTALL_PACKAGES_FROM="$2"14921493 if nvm_is_iojs_version "$VERSION"; then1494 nvm_err 'nvm_install_node_binary does not allow an iojs-prefixed version.'1495 return 10
607 unmodified lines
2103 fi2104 local NVM_INSTALL_SUCCESS2105 # skip binary install if "nobinary" option specified.2106 if [ $nobinary -ne 1 ] && nvm_binary_available "$VERSION"; then2113 if [ "$NVM_IOJS" = true ] && nvm_install_iojs_binary std "$VERSION" "$REINSTALL_PACKAGES_FROM"; then2107 if [ "$NVM_IOJS" = true ] && nvm_install_iojs_binary std "$VERSION"; then2108 NVM_INSTALL_SUCCESS=true2115 elif [ "$NVM_NODE_MERGED" = true ] && nvm_install_merged_node_binary std "$VERSION" "$REINSTALL_PACKAGES_FROM"; then2109 elif [ "$NVM_NODE_MERGED" = true ] && nvm_install_merged_node_binary std "$VERSION"; then2110 NVM_INSTALL_SUCCESS=true2117 elif [ "$NVM_IOJS" != true ] && nvm_install_node_binary "$VERSION" "$REINSTALL_PACKAGES_FROM"; then2111 elif [ "$NVM_IOJS" != true ] && nvm_install_node_binary "$VERSION"; then2112 NVM_INSTALL_SUCCESS=true2113 fi2114 fi2115 if [ "$NVM_INSTALL_SUCCESS" != true ]; then
813 unmodified lines