Commit 6fd639e
committed
fix(updater): per-user NSIS updates, skip auto-update in dev
The Windows auto-updater shipped a per-machine MSI installed silently
(installMode "quiet"). Per-machine MSI upgrades need elevation; "quiet"
suppresses the UAC prompt and apps run non-elevated by default, so the
silent install failed (1603 / "must be Administrator") for ordinary
users — and since the app quits to apply the update, it looked like a
crash/loop. This affected any non-elevated user on auto-update, not just
dev.
- bundle.targets: drop "msi" (was "all"). Windows now ships NSIS only,
which is already configured per-user (nsis.installMode "currentUser")
— so updates install without elevation. The updater manifest will
reference the NSIS "-setup.exe"; the api.mcpmux.com resolver rewrites
URLs filename-agnostically, so no worker change is needed.
- updater.windows.installMode: "quiet" -> "passive". Shows a small
progress UI and, crucially, surfaces a UAC prompt if elevation is ever
needed instead of failing invisibly. With per-user NSIS the normal
path still needs no elevation.
- App.tsx: skip the startup auto-update entirely when import.meta.env.DEV
(i.e. under `pnpm dev`) — otherwise a dev build detects a newer
published release, installs it over the dev build, and relaunches, so
local changes never appear. Production builds are unaffected.
Tests: App update-banner suite stubs DEV=false to keep exercising the
production flow; all 12 pass.
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>1 parent b90b05c commit 6fd639e
3 files changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
| |||
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
| 303 | + | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
| |||
0 commit comments