fix(theseus/updater): re-add --force-run so Theseus auto-relaunches after silent install
install-update-now was spawning setup with ['/S'] alone since the 0.3.31 rewrite. That installs correctly (E2E-proven multiple times this week) but leaves the user without a running browser after the install completes — the setup exits, and the user has to click the Start-menu shortcut to get Theseus back. --force-run is electron-builder's NSIS convention for 'start the app when the install finishes'; it makes the whole update feel like a seamless in-place restart. --updated stays out (was proven not to affect the install itself on our config). Reported by user 2026-09-09 after 0.3.37 → 0.3.39 auto-update ran cleanly but silently, with no post-install relaunch.
This commit is contained in:
parent
a188aa49d2
commit
e0c829dd10
2 changed files with 14 additions and 7 deletions
19
main.js
19
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.
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue