Skip to content

Commit

Permalink
return exit status on run fail
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanjan90 committed Aug 31, 2022
1 parent 88506bb commit 2667d55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/src/main/java/gyro/cli/Gyro.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static void main(String[] arguments) {
});

gyro.init(Arrays.asList(arguments));
gyro.run();
exitStatus = gyro.run();

} catch (Abort error) {
exitStatus = 3;
Expand Down Expand Up @@ -245,7 +245,7 @@ private static int invalidUserInput(Exception error, CommandLine commandLine, Co
return 2;
}

public void run() {
public int run() {

try {
CommandLine.ParseResult parseResult = commandLine.parseArgs(arguments.toArray(new String[0]));
Expand All @@ -264,7 +264,7 @@ public void run() {
// The execute will handle throwing the error
}

commandLine.execute(this.arguments.toArray(new String[0]));
return commandLine.execute(this.arguments.toArray(new String[0]));
}

public static Reflections getReflections() {
Expand Down

0 comments on commit 2667d55

Please sign in to comment.