summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src
diff options
context:
space:
mode:
authorBrendan Allan <[email protected]>2026-04-24 13:27:36 +0800
committerGitHub <[email protected]>2026-04-24 13:27:36 +0800
commit2e156b8990a1e72cfb231eadafe76e4e60c096ea (patch)
tree1a68b80f480b5f6327f77115571699054e76519a /packages/desktop/src
parent3bfe6a1ef6cf41bc7f05339d63ab8d6032c6e8e1 (diff)
downloadopencode-2e156b8990a1e72cfb231eadafe76e4e60c096ea.tar.gz
opencode-2e156b8990a1e72cfb231eadafe76e4e60c096ea.zip
fix(desktop): avoid relaunching without installing updates (#23806)
Diffstat (limited to 'packages/desktop/src')
-rw-r--r--packages/desktop/src/index.tsx9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/desktop/src/index.tsx b/packages/desktop/src/index.tsx
index d6a0ad74f..a760cb409 100644
--- a/packages/desktop/src/index.tsx
+++ b/packages/desktop/src/index.tsx
@@ -297,10 +297,15 @@ const createPlatform = (): Platform => {
return { updateAvailable: true, version: next.version }
},
- update: async () => {
+ updateAndRestart: async () => {
if (!UPDATER_ENABLED || !update) return
if (ostype() === "windows") await commands.killSidecar().catch(() => undefined)
- await update.install().catch(() => undefined)
+ const installed = await update
+ .install()
+ .then(() => true)
+ .catch(() => false)
+ if (!installed) return
+ await relaunch()
},
restart: async () => {