tauri: explicitly kill sidecar before updater relaunch
This commit is contained in:
parent
039f853d80
commit
331ece741f
2 changed files with 27 additions and 77 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { check, DownloadEvent } from "@tauri-apps/plugin-updater"
|
||||
import { relaunch } from "@tauri-apps/plugin-process"
|
||||
import { ask, message } from "@tauri-apps/plugin-dialog"
|
||||
import { invoke } from "@tauri-apps/api/core"
|
||||
|
||||
export const UPDATER_ENABLED = window.__OPENCODE__?.updaterEnabled ?? false
|
||||
|
||||
|
|
@ -34,6 +35,7 @@ export async function runUpdater(onDownloadEvent?: (progress: DownloadEvent) =>
|
|||
return false
|
||||
}
|
||||
|
||||
await invoke("kill_sidecar")
|
||||
await relaunch()
|
||||
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue