Cli tools: make sure that the status code is returned from scripts
The status code wasn't returned from java mains (always 0), also it got lost anyway within our scripts that are calling the java mains. Relates to elastic/elasticsearch#142 Original commit: elastic/x-pack-elasticsearch@db62486605
This commit is contained in:
parent
bad27996f9
commit
f2aca1e9bc
|
@ -40,7 +40,8 @@ public class ESUsersTool extends CliTool {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new ESUsersTool().execute(args);
|
int status = new ESUsersTool().execute(args);
|
||||||
|
System.exit(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ESUsersTool() {
|
public ESUsersTool() {
|
||||||
|
|
|
@ -27,7 +27,8 @@ import static org.elasticsearch.common.cli.CliToolConfig.config;
|
||||||
public class SystemKeyTool extends CliTool {
|
public class SystemKeyTool extends CliTool {
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
new SystemKeyTool().execute(args);
|
int status = new SystemKeyTool().execute(args);
|
||||||
|
System.exit(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final CliToolConfig CONFIG = config("syskey", SystemKeyTool.class)
|
private static final CliToolConfig CONFIG = config("syskey", SystemKeyTool.class)
|
||||||
|
|
Loading…
Reference in New Issue