Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): verified update teardown on Windows+WSL, install integrity check, and resilient WSL readiness handshake #5998

ClosedJgratton24(GitHub profile, opens in a new tab)wants to merge 9 commits intomain fromrefs/pull/5998/headopened View on GitHub

Showing 16 changed files with 12 additions and 0 deletions (loading 15).

x
0 of 16 viewed, 16 left
12 additions and 0 deletionsapps/desktop/src/app/DesktopApp.tsModified
View file
@@ -17,6 +17,7 @@
import * as DesktopWindow from "../window/DesktopWindow.ts";
import * as DesktopBackendPool from "../backend/DesktopBackendPool.ts";
import * as DesktopEnvironment from "./DesktopEnvironment.ts";
+import * as DesktopInstallIntegrity from "./DesktopInstallIntegrity.ts";
import * as DesktopLifecycle from "./DesktopLifecycle.ts";
import * as DesktopLinuxUrlHandler from "./DesktopLinuxUrlHandler.ts";
import * as DesktopObservability from "./DesktopObservability.ts";
@@ -283,6 +284,17 @@
backend: Option.getOrElse(selectedBackend, () => "unknown"),
});
+ // Refuse to boot from a half-applied update (app.asar and
+ // app.asar.unpacked stamped by different builds) before anything loads
+ // from the mismatched halves — the alternative is an opaque
+ // ERR_MODULE_NOT_FOUND crash in the main process.
+ const downloadPageUrl = yield* DesktopInstallIntegrity.resolveDownloadPageUrl;
+ const installIntact = yield* DesktopInstallIntegrity.enforceInstallIntegrity({
+ downloadPageUrl,
+ });
+ if (!installIntact) {
+ return;
+ }
yield* appIdentity.configure;
yield* applicationMenu.configure;
yield* updates.configure;
apps/desktop/src/app/DesktopInstallIntegrity.test.tsAdded
View file