[Fix] ls-remote/install: support lts/-X patterns in installs

Fixes #2692
This commit is contained in:
Jordan Harband
2021-12-16 23:01:05 -08:00
parent aed1d732d7
commit c4c7690dec
2 changed files with 28 additions and 3 deletions

5
nvm.sh
View File

@@ -1465,6 +1465,11 @@ nvm_ls_remote_index_tab() {
$VERSION_LIST
EOF
if [ -n "${LTS-}" ]; then
LTS="$(nvm_normalize_lts "lts/${LTS}")"
LTS="${LTS#lts/}"
fi
VERSIONS="$({ command awk -v lts="${LTS-}" '{
if (!$1) { next }
if (lts && $10 ~ /^\-?$/) { next }