mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-23 02:34:21 +01:00
fix: silent error if bad flag was passed (#2486)
This commit is contained in:
@@ -84,7 +84,11 @@ const cli = yargs(hideBin(process.argv))
|
|||||||
.command(ExportCommand)
|
.command(ExportCommand)
|
||||||
.command(GithubCommand)
|
.command(GithubCommand)
|
||||||
.fail((msg) => {
|
.fail((msg) => {
|
||||||
if (msg.startsWith("Unknown argument") || msg.startsWith("Not enough non-option arguments")) {
|
if (
|
||||||
|
msg.startsWith("Unknown argument") ||
|
||||||
|
msg.startsWith("Not enough non-option arguments") ||
|
||||||
|
msg.startsWith("Invalid values:")
|
||||||
|
) {
|
||||||
cli.showHelp("log")
|
cli.showHelp("log")
|
||||||
}
|
}
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user