Skip to content

Commit ff6eed3

Browse files
fix(desktop): updater quits keep their relaunched app
An update install sets the quit phase to "allowed" and skips shutdown, so the unexpected-exit hook treated it as a crash: it logged a false error and sent SIGTERM to the updated AppImage electron-updater had just spawned as a child of main. The hook now ignores exits in the "allowed" phase. AI-assisted; verified with the tests and tools listed above.
1 parent 81d0583 commit ff6eed3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/desktop/src/app/DesktopLifecycle.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ export const make = DesktopLifecycle.of({
314314
Effect.runSyncWith(context)(
315315
Effect.gen(function* () {
316316
const shutdown = yield* DesktopShutdown.DesktopShutdown;
317-
if (yield* shutdown.isComplete) return;
317+
// "allowed" without a finished shutdown is the updater's quit; its relaunched app is a child.
318+
if (quit.phase === "allowed" || (yield* shutdown.isComplete)) return;
318319
const attributes = { exitCode, quitPhase: quit.phase };
319320
yield* Effect.gen(function* () {
320321
yield* logLifecycleError(

0 commit comments

Comments
 (0)