Raises an exception with help option flag
binkley opened this issue · comments
After a new installation with Homebrew, this was a surprising result:
$ ki -h
Usage: ki [-h] [--version]
-h, --help Prints help
--version Print version
Exception in thread "main" kotlinx.cli.HelpPrintedException
at kotlinx.cli.FlagArgumentsKt$help$1.invoke(FlagArguments.kt:96)
at kotlinx.cli.FlagAction$DefaultImpls.invoke(Actions.kt:9)
at kotlinx.cli.FlagActionBase.invoke(FlagArguments.kt:4)
at kotlinx.cli.CommandLineParser.doParse(CommandLineParser.kt:56)
at kotlinx.cli.CommandLineParser.parseTokenized(CommandLineParser.kt:21)
at kotlinx.cli.CommandLineParser.parse(CommandLineParser.kt:11)
at kotlinx.cli.CommandLineParser.parse(CommandLineParser.kt:7)
at kotlinx.cli.ParseKt.parse(parse.kt:8)
at org.jetbrains.kotlinx.ki.shell.KotlinShell.main(KotlinShell.kt:22)
(An aside -- I see you're using JLine3, such a nice library! You might consider handling command-line option flags with Picocli via the picocli-shell-jline3
dependency. The two libraries work together nicely by design.)