Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test failure causes #378

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/bin/bal
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
JAVA_COMMAND=java
if test -d "$CURRENT_PATH/../dependencies/jdk-21.0.5+11-jre"; then
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk-21.0.5+11-jre/bin/java"
if test -d "$CURRENT_PATH/../dependencies/jdk-17.0.7+7-jre"; then
elif test -d "$CURRENT_PATH/../dependencies/jdk-17.0.7+7-jre"; then
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk-17.0.7+7-jre/bin/java"
elif test -d "$CURRENT_PATH/../dependencies/jdk-11.0.18+10-jre"; then
JAVA_COMMAND="$CURRENT_PATH/../dependencies/jdk-11.0.18+10-jre/bin/java"
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/org/ballerinalang/command/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,8 @@ private static Optional<BCommand> getInvokedCmd(String... args) {
cmdParser.setCommandName("ballerina");
cmdParser.setPosixClusteredShortOptionsAllowed(false);

CommandLine.ParseResult parseResult = cmdParser.parseArgs(args);

List<CommandLine> parsedCommands = cmdParser.parse(args);

if (parseResult.hasSubcommand()) {
return Optional.of((BCommand) parseResult.subcommand().commandSpec().userObject());
}

if (parsedCommands.size() < 1) {
return Optional.of(defaultCmd);
}
Expand Down