Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes #3417

authored by Jordan Harband · committed by Jordan Harband · parent 9a28dbd · Browse files · 2 files+7 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−0 removed

  • tests:+3 added−0 removed
  • other:+4 added−0 removed

2 files+7 added−0 removed

modified:test/fast/Unit tests/nvm_normalize_lts+3 added
14 unmodified lines
15ACTUAL="$(nvm_normalize_lts "lts/*")"16EXPECTED='lts/*'17[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<"1819if ACTUAL="$(nvm_normalize_lts lts/ARGON)"; then20 die "expected failure, got >${ACTUAL}<"21fi2223MOCKS_DIR="../Unit tests/mocks"24STAR="$(cat "$MOCKS_DIR/lts-star.txt")"25
16 unmodified lines
modified:nvm.sh+4 added
889 unmodified lines
890 return 2891 fi892 ;;893 *)894 if [ "${LTS}" != "$(echo "${LTS}" | command tr '[:upper:]' '[:lower:]')" ]; then895 nvm_err 'LTS names must be lowercase'896 return 3897 fi898 nvm_echo "${LTS}"899 ;;900 esac901}
3722 unmodified lines