Commit 52e53e1
authored
fix(desktop): switching back to the stable update channel no longer errors (#197)
## Problem
On the Updates settings page, choosing **Stable** after Beta or Nightly
shows `Channel must be a string, but got: null`.
`configureExplicitConsent` assigned `null` to `autoUpdater.channel`;
electron-updater's setter rejects non-strings once a channel has been
set.
## What changed
- `apps/desktop/src/updater.ts`: stable now sets electron-updater's
default channel name `latest` explicitly (same `latest-mac.yml`, no
behavior change for fresh installs).
- `apps/desktop/tests/updater.spec.ts`: the `electron-updater` mock
enforces the real `channel` setter rules, so the existing channel-switch
test fails on the old code (verified) and asserts `latest` now.
[skip changeset] — desktop app, not a changesets-managed package.1 parent 0387965 commit 52e53e1
2 files changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
| |||
258 | 264 | | |
259 | 265 | | |
260 | 266 | | |
261 | | - | |
| 267 | + | |
262 | 268 | | |
263 | 269 | | |
264 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
18 | 29 | | |
19 | 30 | | |
20 | 31 | | |
| |||
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
61 | | - | |
| 72 | + | |
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
| |||
225 | 236 | | |
226 | 237 | | |
227 | 238 | | |
228 | | - | |
| 239 | + | |
229 | 240 | | |
230 | 241 | | |
231 | 242 | | |
| |||
0 commit comments