diff --git a/main.js b/main.js index 1f0972a7..f397d77d 100644 --- a/main.js +++ b/main.js @@ -3232,15 +3232,22 @@ ipcMain.handle("recheck-update", async () => { return { updateAvailable, currentVersion: app.getVersion() }; }); // One-click "Install & restart". Requires the silent pre-fetch to have -// finished (updateDownloadState === "ready"). Launches the setup with /S -// (skips the wizard; our nsis/installer.nsh's Ariadne prompt is bypassed -// too on upgrades because the Ariadne registry key is already present), -// then quits Theseus so the installer can overwrite it. When the installer -// finishes, the user re-launches Theseus and lands on the new version. +// finished (updateDownloadState === "ready"). Launches the setup with +// /S (silent, skips the wizard) and --force-run (electron-builder's NSIS +// convention for "start the app when the install finishes"), then quits +// Theseus so the installer can overwrite it. The user sees the browser +// disappear for a couple of seconds and come back on the new version — +// no manual relaunch needed. Verified E2E on 0.3.33 → 0.3.34 in the +// 2026-09-08 session; the 0.3.37 → 0.3.39 update ran WITHOUT --force-run +// (the flag was dropped in the 0.3.31 rewrite once it was clear /S alone +// installs correctly) and the user reported the missing relaunch — this +// commit puts --force-run back on so the auto-restart is part of the +// standard flow again. --updated stays out: the earlier E2E showed it +// wasn't load-bearing correctness for our NSIS config. ipcMain.handle("install-update-now", () => { if (updateDownloadState !== "ready" || !updateDownloadPath) return false; try { - const p = spawn(updateDownloadPath, ["/S"], { detached: true, stdio: "ignore" }); + const p = spawn(updateDownloadPath, ["/S", "--force-run"], { detached: true, stdio: "ignore" }); p.unref(); } catch (e) { console.warn("update spawn failed:", e?.message); return false; } // Give the child a moment to inherit our arguments before we exit. diff --git a/package.json b/package.json index b5555d46..9a17f7e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "theseus-navigator", - "version": "0.3.39", + "version": "0.3.40", "description": "Theseus Navigator — a browser that follows the thread. By Silent Mode, a Deviant project.", "author": "Silent Mode", "main": "main.js",