summaryrefslogtreecommitdiffhomepage
path: root/packages/desktop/src
diff options
context:
space:
mode:
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 () => {