Bugfix: if version argument is used on command line, only display the version and them quit
This commit is contained in:
@@ -83,8 +83,8 @@ public class Worker {
|
||||
@Option(name = "-ui", usage = "Specify the user interface to use, default 'text', available 'oneline', 'text'", required = false)
|
||||
private String ui_type = "text";
|
||||
|
||||
@Option(name = "--version", usage = "Display application version", required = false)
|
||||
private boolean display_version = false;
|
||||
@Option(name = "--version", usage = "Display application version", required = false, handler = VersionParameterHandler.class)
|
||||
private VersionParameterHandler versionHandler;
|
||||
|
||||
public static void main(String[] args) {
|
||||
new Worker().doMain(args);
|
||||
@@ -104,12 +104,6 @@ public class Worker {
|
||||
return;
|
||||
}
|
||||
|
||||
if (display_version) {
|
||||
Configuration config = new Configuration(null, "", "");
|
||||
System.out.println("Version: " + config.getJarVersion());
|
||||
return;
|
||||
}
|
||||
|
||||
ComputeType compute_method = ComputeType.CPU_ONLY;
|
||||
Configuration config = new Configuration(null, login, password);
|
||||
config.setPrintLog(print_log);
|
||||
|
||||
Reference in New Issue
Block a user