fix: do not kill sidecar during updating
This commit is contained in:
parent
ab53ab21e2
commit
f32c5ba244
@ -14,7 +14,6 @@ import {
|
|||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { relaunch } from "@tauri-apps/api/process";
|
import { relaunch } from "@tauri-apps/api/process";
|
||||||
import { checkUpdate, installUpdate } from "@tauri-apps/api/updater";
|
import { checkUpdate, installUpdate } from "@tauri-apps/api/updater";
|
||||||
import { killSidecar, restartSidecar } from "@/services/cmds";
|
|
||||||
import { atomUpdateState } from "@/services/states";
|
import { atomUpdateState } from "@/services/states";
|
||||||
import Notice from "../base/base-notice";
|
import Notice from "../base/base-notice";
|
||||||
|
|
||||||
@ -43,11 +42,9 @@ const UpdateDialog = (props: Props) => {
|
|||||||
setUpdateState(true);
|
setUpdateState(true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await killSidecar();
|
|
||||||
await installUpdate();
|
await installUpdate();
|
||||||
await relaunch();
|
await relaunch();
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
await restartSidecar();
|
|
||||||
Notice.error(err?.message || err.toString());
|
Notice.error(err?.message || err.toString());
|
||||||
} finally {
|
} finally {
|
||||||
setUpdateState(false);
|
setUpdateState(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user