Skip to content

Commit 8391f6e

Browse files
pbassinermarc0der
authored andcommitted
Make upgrade command bash/zsh compatible
1 parent 5caa2ec commit 8391f6e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/bash/sdkman-upgrade.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ function __sdk_upgrade {
2323
candidates=$1
2424
else
2525
all=true
26-
candidates=${SDKMAN_CANDIDATES[@]}
26+
if [[ "$zsh_shell" == 'true' ]]; then
27+
candidates=( ${SDKMAN_CANDIDATES[@]} )
28+
else
29+
candidates=${SDKMAN_CANDIDATES[@]}
30+
fi
2731
fi
2832
installed_count=0
2933
upgradable_count=0

0 commit comments

Comments
 (0)