fix(coding-agent): avoid Windows pi update exit assertion

closes #5805
This commit is contained in:
Armin Ronacher
2026-06-16 15:10:23 +02:00
Unverified
parent 75b0d723c0
commit 06d8c54de2
2 changed files with 10 additions and 1 deletions
+1
View File
@@ -4,6 +4,7 @@
### Fixed
- Fixed successful `pi update` on Windows to exit naturally instead of calling `process.exit(0)`, avoiding a Node.js/libuv assertion after version-check network requests ([#5805](https://github.com/earendil-works/pi/issues/5805)).
- Fixed inherited Google and `google-vertex` Gemini model metadata to map `latest` aliases to the current models, add Gemini 3.5 Flash for Vertex, correct Gemini 2.5 Flash Vertex cache pricing, and remove shut-down Vertex preview models ([#5761](https://github.com/earendil-works/pi/issues/5761)).
- Fixed the session selector to stay open and show the all-sessions empty state when both current-folder and all-scope session lists are empty ([#5747](https://github.com/earendil-works/pi/issues/5747)).
- Fixed inherited Moonshot AI China model metadata to include Kimi K2.7 Code, and omitted unsupported thinking-off payloads for Kimi K2.7 Code models ([#5760](https://github.com/earendil-works/pi/issues/5760)).
+9 -1
View File
@@ -467,7 +467,15 @@ export async function main(args: string[], options?: MainOptions) {
}
if (await handlePackageCommand(args, { extensionFactories: options?.extensionFactories })) {
process.exit(process.exitCode ?? 0);
const exitCode = process.exitCode ?? 0;
if (process.platform === "win32" && exitCode === 0 && args[0] === "update") {
// We normally prefer process.exit(0) for package commands so bad extensions cannot keep
// one-shot commands alive. On Windows, Node can assert after fetch() if process.exit(0)
// runs during teardown; let successful `pi update` drain naturally instead.
// https://github.com/nodejs/node/issues/56645
return;
}
process.exit(exitCode);
return;
}