[Fix] nvm_normalize_lts: error when an LTS name is not lowercase

Fixes #3417
This commit is contained in:
Jordan Harband
2024-09-04 13:54:41 -07:00
parent 9a28dbd394
commit 9fb9dec710
2 changed files with 7 additions and 0 deletions

4
nvm.sh
View File

@@ -891,6 +891,10 @@ nvm_normalize_lts() {
fi
;;
*)
if [ "${LTS}" != "$(echo "${LTS}" | command tr '[:upper:]' '[:lower:]')" ]; then
nvm_err 'LTS names must be lowercase'
return 3
fi
nvm_echo "${LTS}"
;;
esac