[Fix] nvm ls-remote: accept versions that end with a dot

Fixes #983.
This commit is contained in:
Dena Burd
2020-09-24 13:46:29 -07:00
committed by Jordan Harband
parent f2c5ce459a
commit c72f2c6f21
2 changed files with 17 additions and 0 deletions

4
nvm.sh
View File

@@ -1240,6 +1240,10 @@ nvm_ls_remote_index_tab() {
local PATTERN
PATTERN="${3-}"
if [ "${PATTERN#"${PATTERN%?}"}" = '.' ]; then
PATTERN="${PATTERN%.}"
fi
local VERSIONS
if [ -n "${PATTERN}" ] && [ "${PATTERN}" != '*' ]; then
if [ "${FLAVOR}" = 'iojs' ]; then