Skip to content

Commit

Permalink
In __sdkman_list_versions() strip EOL whitespace.
Browse files Browse the repository at this point in the history
Add sed(1) to clean whitespace at the end of lines (EOL) after a
curl(1) call to get a list of versions.
  • Loading branch information
jaalto committed Oct 5, 2024
1 parent 47e4c6c commit 40e6f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/bash/sdkman-list.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 40e6f54

Please sign in to comment.