# HG changeset patch # User František Kučera # Date 1387553647 -3600 # Node ID d42ed0d10a10ca755dec48c0825e4c4799898665 # Parent e225bdcd260eb0a4e0baca54c5666fbca2f2dbf4 CLI: --help is default option diff -r e225bdcd260e -r d42ed0d10a10 java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java --- a/java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java Mon Dec 16 23:17:34 2013 +0100 +++ b/java/sql-dk/src/info/globalcode/sql/dk/CLIStarter.java Fri Dec 20 16:34:07 2013 +0100 @@ -32,11 +32,17 @@ private Configuration configuration; public static void main(String[] args) { + + if (args.length == 0) { + args = new String[]{CLIParser.Tokens.INFO_HELP}; + } + try { CLIParser parser = new CLIParser(); CLIOptions options = parser.parseOptions(args); options.validate(); CLIStarter starter = new CLIStarter(options); + starter.installDefaultConfiguration(); starter.process(); } catch (CLIParserException e) { log.log(Level.SEVERE, "Unable to parse CLI options", e); @@ -76,7 +82,6 @@ @Override public Configuration getConfiguration() { if (configuration == null) { - installDefaultConfiguration(); configuration = loadConfiguration(); } return configuration;