You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array indexing is wrong, it starts at 1 (not 0) and ends at the highest index, not at array length - 1. You have both in C or Java, but shell is different.
Executed in bash, the ${#versions} is - for whatever reason - restricted to four bits. So the maximum value is 15. If the versions array is > 15, you have to use ${#versions[@]} instead (cf. https://linuxhandbook.com/array-length-bash/).
The text was updated successfully, but these errors were encountered:
ascheman
added a commit
to ascheman/sdkman-cli
that referenced
this issue
Jan 30, 2024
Cf. https://sdkman.slack.com/archives/CJTNQA94M/p1706573532033689?thread_ts=1706516271.626039&cid=CJTNQA94M
${#versions}
is - for whatever reason - restricted to four bits. So the maximum value is 15. If the versions array is > 15, you have to use${#versions[@]}
instead (cf. https://linuxhandbook.com/array-length-bash/).The text was updated successfully, but these errors were encountered: