Skip to content

Commit e4fc020

Browse files
committed
Display native help, falling back to legacy help
1 parent bb119b8 commit e4fc020

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/bash/sdkman-main.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
# limitations under the License.
1717
#
1818

19+
function ___sdkman_help() {
20+
if [[ -f "$SDKMAN_DIR/libexec/help" ]]; then
21+
"$SDKMAN_DIR/libexec/help"
22+
else
23+
__sdk_help
24+
fi
25+
}
26+
1927
function sdk() {
2028

2129
COMMAND="$1"
@@ -87,7 +95,7 @@ function sdk() {
8795

8896
# no command provided
8997
if [[ -z "$COMMAND" ]]; then
90-
__sdk_help
98+
___sdkman_help
9199
return 1
92100
fi
93101

@@ -111,7 +119,7 @@ function sdk() {
111119
echo ""
112120
__sdkman_echo_red "Invalid command: $COMMAND"
113121
echo ""
114-
__sdk_help
122+
___sdkman_help
115123
fi
116124

117125
# Check whether the candidate exists

0 commit comments

Comments
 (0)