Skip to content

Commit

Permalink
fix: do not kill sidecar during updating
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzgydi authored Sep 9, 2022
1 parent ab53ab2 commit f32c5ba
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/components/layout/update-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
} from "@mui/material";
import { relaunch } from "@tauri-apps/api/process";
import { checkUpdate, installUpdate } from "@tauri-apps/api/updater";
import { killSidecar, restartSidecar } from "@/services/cmds";
import { atomUpdateState } from "@/services/states";
import Notice from "../base/base-notice";

Expand Down Expand Up @@ -43,11 +42,9 @@ const UpdateDialog = (props: Props) => {
setUpdateState(true);

try {
await killSidecar();
await installUpdate();
await relaunch();
} catch (err: any) {
await restartSidecar();
Notice.error(err?.message || err.toString());
} finally {
setUpdateState(false);
Expand Down

0 comments on commit f32c5ba

Please sign in to comment.