mirror of
https://github.com/MoonshotAI/kimi-code.git
synced 2026-07-10 01:39:25 +00:00
fix(kimi-code): exit 1 when a headless (-p) turn fails (#1483)
Headless (`kimi -p`) failures could exit with code 0 when the event loop drained during the shutdown cleanup (e.g. telemetry's unref'd retry backoff when the network is blocked), because the rejection never reached the process.exit(1) call. Set the failure exit code before any await in both the run-prompt catch and the main catch, and keep the cleanup timeout ref'd so the loop stays alive long enough for the rejection to propagate.
This commit is contained in:
parent
528e224f62
commit
89f09b55eb
1 changed files with 5 additions and 0 deletions
5
.changeset/fix-headless-exit-code.md
Normal file
5
.changeset/fix-headless-exit-code.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@moonshot-ai/kimi-code": patch
|
||||
---
|
||||
|
||||
Fix `kimi -p` runs exiting with code 0 when a turn fails.
|
||||
Loading…
Add table
Add a link
Reference in a new issue