diff --git a/lib/utils.sh b/lib/utils.sh index 5986021..dccf46b 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -145,6 +145,9 @@ resolve_version() { if [ "$query" = lts ] || [ "$query" = "lts/*" ]; then query="${nodejs_codenames[${#nodejs_codenames[@]} - 1]#*:}" + local all_versions + all_versions=$("$ASDF_NODEJS_PLUGIN_DIR/bin/list-all" 2>/dev/null | tr ' ' '\n') + query=$(echo "$all_versions" | grep "^$query\." | tail -n1) fi if [ "${ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY-}" ]; then