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:
parent
5a6e142bc8
commit
7ec8a7ab27
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue