mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
fix(cli): restore native --help for subcommands
This commit is contained in:
@@ -78,8 +78,8 @@ let cli = yargs(hideBin(process.argv))
|
||||
.parserConfiguration({ "populate--": true })
|
||||
.scriptName("kilo") // kilocode_change
|
||||
.wrap(100)
|
||||
.help(false)
|
||||
.option("help", { describe: "show help", type: "boolean", alias: "h" })
|
||||
.help("help", "show help")
|
||||
.alias("help", "h")
|
||||
.version("version", "show version number", Installation.VERSION)
|
||||
.alias("version", "v")
|
||||
.option("print-logs", {
|
||||
@@ -92,15 +92,6 @@ let cli = yargs(hideBin(process.argv))
|
||||
choices: ["DEBUG", "INFO", "WARN", "ERROR"],
|
||||
})
|
||||
.middleware(async (opts) => {
|
||||
if (opts.help) {
|
||||
cli.showHelp()
|
||||
process.exit(0)
|
||||
}
|
||||
if (opts.version) {
|
||||
process.stdout.write(Installation.VERSION + "\n")
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
await Log.init({
|
||||
print: process.argv.includes("--print-logs"),
|
||||
dev: Installation.isLocal(),
|
||||
|
||||
Reference in New Issue
Block a user