diff options
| author | Ariane Emory <[email protected]> | 2026-01-09 15:21:01 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-09 14:21:01 -0600 |
| commit | 75df5040ea45ba5e7349ed6e6871793a674906b3 (patch) | |
| tree | a38f385bb8903c0eead54579b7d71899f145fa8e | |
| parent | f2b2940298c859f1f699837cab687e9a7b29d603 (diff) | |
| download | opencode-75df5040ea45ba5e7349ed6e6871793a674906b3.tar.gz opencode-75df5040ea45ba5e7349ed6e6871793a674906b3.zip | |
fix: report config errors instead of silent termination (#7522)
| -rw-r--r-- | packages/opencode/src/index.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/opencode/src/index.ts b/packages/opencode/src/index.ts index e1c2cbd1d..6099443e7 100644 --- a/packages/opencode/src/index.ts +++ b/packages/opencode/src/index.ts @@ -99,14 +99,16 @@ const cli = yargs(hideBin(process.argv)) .command(GithubCommand) .command(PrCommand) .command(SessionCommand) - .fail((msg) => { + .fail((msg, err) => { if ( msg?.startsWith("Unknown argument") || msg?.startsWith("Not enough non-option arguments") || msg?.startsWith("Invalid values:") ) { + if (err) throw err cli.showHelp("log") } + if (err) throw err process.exit(1) }) .strict() |
