[Fix] `nvm_ls_remote_index_tab`: handle long version lists
parent
c169d622ff
commit
291c7c4c47
7
nvm.sh
7
nvm.sh
|
@ -1396,8 +1396,7 @@ nvm_ls_remote_index_tab() {
|
|||
local LTS_ALIAS
|
||||
local LTS_VERSION
|
||||
command mkdir -p "$(nvm_alias_path)/lts"
|
||||
nvm_echo "${VERSION_LIST}" \
|
||||
| command awk '{
|
||||
{ command awk '{
|
||||
if ($10 ~ /^\-?$/) { next }
|
||||
if ($10 && !a[tolower($10)]++) {
|
||||
if (alias) { print alias, version }
|
||||
|
@ -1416,7 +1415,9 @@ nvm_ls_remote_index_tab() {
|
|||
LTS_ALIAS="${LTS_ALIAS_LINE%% *}"
|
||||
LTS_VERSION="${LTS_ALIAS_LINE#* }"
|
||||
nvm_make_alias "${LTS_ALIAS}" "${LTS_VERSION}" >/dev/null 2>&1
|
||||
done
|
||||
done; } << EOF
|
||||
$VERSION_LIST
|
||||
EOF
|
||||
|
||||
VERSIONS="$({ command awk -v lts="${LTS-}" '{
|
||||
if (!$1) { next }
|
||||
|
|
Loading…
Reference in New Issue