tauri: don't ask to restart separately in updater

pull/5311/head
Brendan Allan 2025-12-10 11:31:50 +08:00
parent 4a96836d11
commit 661122bab8
No known key found for this signature in database
GPG Key ID: 41E835AEA046A32E
1 changed files with 2 additions and 3 deletions

View File

@ -20,7 +20,7 @@ export async function runUpdater(onDownloadEvent?: (progress: DownloadEvent) =>
return false
}
const shouldUpdate = await ask(`Version ${update.version} of OpenCode is available, would you like to install it?`)
const shouldUpdate = await ask(`Version ${update.version} of OpenCode has been downloaded, would you like to install it and relaunch?`)
if (!shouldUpdate) return
try {
@ -30,8 +30,7 @@ export async function runUpdater(onDownloadEvent?: (progress: DownloadEvent) =>
return false
}
const shouldRestart = await ask("Update installed successfully, would you like to restart OpenCode?")
if (shouldRestart) await relaunch()
await relaunch()
return true
}