mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
[Fix] nvm_ls_remote_index_tab
: only compare the pattern to the version, not the LTS name
Fixes 3474
This commit is contained in:
parent
f7363acbb9
commit
4f91e99415
4
nvm.sh
4
nvm.sh
@ -1667,10 +1667,11 @@ EOF
|
|||||||
LTS="${LTS#lts/}"
|
LTS="${LTS#lts/}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
VERSIONS="$({ command awk -v lts="${LTS-}" '{
|
VERSIONS="$({ command awk -v lts="${LTS-}" -v pattern="${PATTERN:-.*}" '{
|
||||||
if (!$1) { next }
|
if (!$1) { next }
|
||||||
if (lts && $10 ~ /^\-?$/) { next }
|
if (lts && $10 ~ /^\-?$/) { next }
|
||||||
if (lts && lts != "*" && tolower($10) !~ tolower(lts)) { next }
|
if (lts && lts != "*" && tolower($10) !~ tolower(lts)) { next }
|
||||||
|
if ($1 !~ pattern) { next }
|
||||||
if ($10 !~ /^\-?$/) {
|
if ($10 !~ /^\-?$/) {
|
||||||
if ($10 && $10 != prev) {
|
if ($10 && $10 != prev) {
|
||||||
print $1, $10, "*"
|
print $1, $10, "*"
|
||||||
@ -1682,7 +1683,6 @@ EOF
|
|||||||
}
|
}
|
||||||
prev=$10;
|
prev=$10;
|
||||||
}' \
|
}' \
|
||||||
| nvm_grep -w "${PATTERN:-.*}" \
|
|
||||||
| $SORT_COMMAND; } << EOF
|
| $SORT_COMMAND; } << EOF
|
||||||
$VERSION_LIST
|
$VERSION_LIST
|
||||||
EOF
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user