We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35317c6 commit 7ca2e0aCopy full SHA for 7ca2e0a
apps/desktop/src/components/main/body/update.tsx
@@ -1,4 +1,5 @@
1
import { type UnlistenFn } from "@tauri-apps/api/event";
2
+import { message } from "@tauri-apps/plugin-dialog";
3
import { relaunch } from "@tauri-apps/plugin-process";
4
import { useCallback, useEffect, useState } from "react";
5
@@ -13,8 +14,15 @@ export function Update() {
13
14
if (!version) {
15
return;
16
}
- await commands.install(version);
17
- await relaunch();
+ const result = await commands.install(version);
18
+ if (result.status === "ok") {
19
+ await relaunch();
20
+ } else {
21
+ await message(`Failed to install update: ${result.error}`, {
22
+ title: "Update Failed",
23
+ kind: "error",
24
+ });
25
+ }
26
}, [version]);
27
28
0 commit comments