Skip to content
Myr

[Fix] `nvm_ls_remote_index_tab`: handle long version lists

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

authored by Kevin Stolp · committed by Jordan Harband · parent c169d62 · 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
1394 unmodified lines
1395 )"1396 local LTS_ALIAS1397 local LTS_VERSION1398 command mkdir -p "$(nvm_alias_path)/lts"1399 nvm_echo "${VERSION_LIST}" \1400 | command awk '{1399 { command awk '{1400 if ($10 ~ /^\-?$/) { next }1401 if ($10 && !a[tolower($10)]++) {1402 if (alias) { print alias, version }1403 alias_name = "lts/" tolower($10)
10 unmodified lines
1414 | while read -r LTS_ALIAS_LINE; do1415 LTS_ALIAS="${LTS_ALIAS_LINE%% *}"1416 LTS_VERSION="${LTS_ALIAS_LINE#* }"1417 nvm_make_alias "${LTS_ALIAS}" "${LTS_VERSION}" >/dev/null 2>&11419 done1418 done; } << EOF1419$VERSION_LIST1420EOF14211422 VERSIONS="$({ command awk -v lts="${LTS-}" '{1423 if (!$1) { next }1424 if (lts && $10 ~ /^\-?$/) { next }
2820 unmodified lines