CLI tool: Fix exit status changes

In elastic/elasticsearch#12165 the return value of the CLITool was changed from an integer
to the ExitStatus enum. This commit adapts the cli tools of x-plugins.

Original commit: elastic/x-pack-elasticsearch@fc6478bfa5
This commit is contained in:
Alexander Reelsen 2015-07-30 15:30:55 +02:00
parent 5a6e142bc8
commit 7ec8a7ab27
3 changed files with 6 additions and 6 deletions

View File

@ -42,8 +42,8 @@ public class ESUsersTool extends CliTool {
.build();
public static void main(String[] args) {
int status = new ESUsersTool().execute(args);
System.exit(status);
ExitStatus exitStatus = new ESUsersTool().execute(args);
System.exit(exitStatus.status());
}
public ESUsersTool() {

View File

@ -36,8 +36,8 @@ public class SystemKeyTool extends CliTool {
public static void main(String[] args) throws Exception {
int status = new SystemKeyTool().execute(args);
System.exit(status);
ExitStatus exitStatus = new SystemKeyTool().execute(args);
System.exit(exitStatus.status());
}
private static final CliToolConfig CONFIG = config("syskey", SystemKeyTool.class)

View File

@ -31,8 +31,8 @@ public class CronEvalTool extends CliTool {
.build();
public static void main(String[] args) throws Exception {
int status = new CronEvalTool().execute(args);
System.exit(status);
ExitStatus exitStatus = new CronEvalTool().execute(args);
System.exit(exitStatus.status());
}
public CronEvalTool() {