moditect / layrry

A Runner and API for Layered Java Applications
Apache License 2.0
332 stars 33 forks source link

Invoking LayrryLauncher with no args should print usage and quit #81

Closed aalmiray closed 3 years ago

aalmiray commented 3 years ago

Currently it prints an exception and quits

Exception in thread "main" com.beust.jcommander.ParameterException: The following option is required: [--layers-config]
    at com.beust.jcommander.JCommander.validateOptions(JCommander.java:388)
    at com.beust.jcommander.JCommander.parse(JCommander.java:357)
    at com.beust.jcommander.JCommander.parse(JCommander.java:335)
    at org.moditect.layrry.launcher.LayrryLauncher.launch(LayrryLauncher.java:50)
    at org.moditect.layrry.launcher.LayrryLauncher.main(LayrryLauncher.java:41)
gunnarmorling commented 3 years ago

Oh yes, indeed.

gunnarmorling commented 3 years ago

I also thought we discussed at some point to make --layers-config optional, defaulting to layers.yaml|toml in the current directory.

aalmiray commented 3 years ago

Though to be fully compatible with all possible configured parsers the code should iterate over every available LayersConfigParser instance and check if "layers." + parser.getPreferredFileExtension() exists in the current launch directory.

gunnarmorling commented 3 years ago

Yes, that'd be the perfect solution.

github-actions[bot] commented 1 year ago

Released in v1.0.0.Alpha2 -> https://github.com/moditect/layrry/releases/tag/v1.0.0.Alpha2