Skip to content

Commit 4b22f99

Browse files
rgoldbergmarc0der
authored andcommitted
Remove legacy bash workaround from __sdk_update
The code that didn't work on legacy bash was removed a long time ago, so the workaround is no longer necessary The workaround prevents the tests from all completing successfully on legacy bash, so it's very useful to remove the workaround
1 parent 98da69c commit 4b22f99

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/main/bash/sdkman-update.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ function __sdk_update() {
2626
__sdkman_echo_debug "Fetched candidates: $fresh_candidates_csv"
2727

2828
if [[ -n "${fresh_candidates_csv}" ]] && ! grep -iq 'html' <<< "${fresh_candidates_csv}"; then
29-
# legacy bash workaround
30-
if [[ "$bash_shell" == 'true' && "$BASH_VERSINFO" -lt 4 ]]; then
31-
__sdkman_legacy_bash_message
32-
echo "$fresh_candidates_csv" >| "$SDKMAN_CANDIDATES_CACHE"
33-
return 0
34-
fi
35-
3629
__sdkman_echo_debug "Fresh and cached candidate lengths: ${#fresh_candidates_csv} ${#SDKMAN_CANDIDATES_CSV}"
3730

3831
local fresh_candidates combined_candidates diff_candidates

src/main/bash/sdkman-utils.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,3 @@ function __sdkman_echo_confirm() {
110110
echo -e -n "\033[1;33m$1\033[0m"
111111
fi
112112
}
113-
114-
function __sdkman_legacy_bash_message() {
115-
__sdkman_echo_red "An outdated version of bash was detected on your system!"
116-
echo ""
117-
__sdkman_echo_red "We recommend upgrading to bash 4.x, you have:"
118-
echo ""
119-
__sdkman_echo_yellow " $BASH_VERSION"
120-
echo ""
121-
__sdkman_echo_yellow "Need to use brute force to replace candidates..."
122-
}

0 commit comments

Comments
 (0)