From 40e6f54935d77ebe544f81a349618e3b321a2a4c Mon Sep 17 00:00:00 2001 From: Jari Aalto Date: Sat, 5 Oct 2024 20:28:18 +0300 Subject: [PATCH] In __sdkman_list_versions() strip EOL whitespace. Add sed(1) to clean whitespace at the end of lines (EOL) after a curl(1) call to get a list of versions. --- src/main/bash/sdkman-list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 src/main/bash/sdkman-list.sh diff --git a/src/main/bash/sdkman-list.sh b/src/main/bash/sdkman-list.sh old mode 100644 new mode 100755 index 5624120fc..151d8370d --- a/src/main/bash/sdkman-list.sh +++ b/src/main/bash/sdkman-list.sh @@ -44,7 +44,7 @@ function __sdkman_list_versions() { if [[ "$SDKMAN_AVAILABLE" == "false" ]]; then __sdkman_offline_list "$candidate" "$versions_csv" else - __sdkman_echo_paged "$(__sdkman_secure_curl "${SDKMAN_CANDIDATES_API}/candidates/${candidate}/${SDKMAN_PLATFORM}/versions/list?current=${CURRENT}&installed=${versions_csv}")" + __sdkman_echo_paged "$(__sdkman_secure_curl "${SDKMAN_CANDIDATES_API}/candidates/${candidate}/${SDKMAN_PLATFORM}/versions/list?current=${CURRENT}&installed=${versions_csv}" | sed -e 's/[[:space:]]*$//')" fi }