From 9895f4b48cf182150e5a38d81e98f86705878cd5 Mon Sep 17 00:00:00 2001 From: Reetik Rajan Date: Sat, 5 Oct 2024 09:21:42 +0530 Subject: [PATCH] Refactor nvm_remote_version to handle "lts" as a special case --- nvm.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvm.sh b/nvm.sh index 9eeede2ac6c..d06bb9f8bed 100755 --- a/nvm.sh +++ b/nvm.sh @@ -748,6 +748,9 @@ nvm_remote_version() { "$(nvm_iojs_prefix)") VERSION="$(NVM_LTS="${NVM_LTS-}" nvm_ls_remote_iojs | command tail -1)" &&: ;; + "lts") + VERSION="$(NVM_LTS="lts/*" nvm_ls_remote | command tail -1)" &&: + ;; *) VERSION="$(NVM_LTS="${NVM_LTS-}" nvm_ls_remote "${PATTERN}")" &&: ;;