[skip ci] fix empty arguments exception
This commit is contained in:
parent
640c0bd090
commit
c8e880eba4
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,9 @@ import kotlin.system.exitProcess
|
||||||
*/
|
*/
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
|
|
||||||
val cmd = CliArgumentsParser("java -jar provs-server.jar").parseCommand(args)
|
val checkedArgs = if (args.size == 0) arrayOf("-h") else args
|
||||||
|
|
||||||
|
val cmd = CliArgumentsParser("java -jar provs-server.jar").parseCommand(checkedArgs)
|
||||||
if (!cmd.isValid()) {
|
if (!cmd.isValid()) {
|
||||||
println("Arguments are not valid, pls try -h for help.")
|
println("Arguments are not valid, pls try -h for help.")
|
||||||
exitProcess(1)
|
exitProcess(1)
|
||||||
|
|
Loading…
Reference in a new issue