mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 12:17:27 +00:00
fix(desktop): avoid relaunching without installing updates (#23806)
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user