Skip to content

Commit 046df82

Browse files
committed
Address review suggestions
1 parent ee52ac7 commit 046df82

File tree

2 files changed

+7
-2
lines changed
  • cli/ballerina-cli/src/main/java/io/ballerina/cli/launcher
  • tests/ballerina-test-utils/src/main/java/org/ballerinalang/test/context

2 files changed

+7
-2
lines changed

cli/ballerina-cli/src/main/java/io/ballerina/cli/launcher/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static void main(String... args) {
8787
Runtime.getRuntime().exit(e.getExitCode());
8888
} catch (Throwable e) {
8989
RuntimeUtils.logBadSad(e);
90-
Runtime.getRuntime().exit(1);
90+
Runtime.getRuntime().exit(1);;
9191
}
9292
}
9393

tests/ballerina-test-utils/src/main/java/org/ballerinalang/test/context/BMainInstance.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class BMainInstance implements BMain {
5151
private String agentArgs = "";
5252
private BalServer balServer;
5353
public static final int TIMEOUT = 10000;
54-
public int exitCode = 0;
54+
private int exitCode = 0;
5555

5656
private static class StreamGobbler extends Thread {
5757
private final InputStream inputStream;
@@ -682,6 +682,11 @@ public String runMainAndReadStdOut(String command, String[] args, Map<String, St
682682
}
683683
}
684684

685+
/**
686+
* Returns the exit code of the last executed process.
687+
*
688+
* @return the exit code from the most recent call to {@link #runMainAndReadStdOut}
689+
*/
685690
public int getLastExitCode() {
686691
return exitCode;
687692
}

0 commit comments

Comments
 (0)