MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / promptInstallUpdate

Function promptInstallUpdate

apps/desktop/src/main/index.ts:920–943  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

918};
919
920const promptInstallUpdate = async (version: string) => {
921 if (updateDialogOpen) return;
922 updateDialogOpen = true;
923 // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: dialog wrapper guarantees the open flag clears
924 try {
925 const response = await dialog.showMessageBox({
926 type: "info",
927 title: "Update ready",
928 message: `Executor ${version} is ready to install.`,
929 detail: "Restart now to apply the update, or keep working — we'll prompt again later.",
930 buttons: ["Restart now", "Later"],
931 defaultId: 0,
932 cancelId: 1,
933 });
934 if (response.response === 0) {
935 setUpdateStatus({ state: "installing", version });
936 autoUpdater.quitAndInstall(false, true);
937 return;
938 }
939 declinedUpdateVersion = version;
940 } finally {
941 updateDialogOpen = false;
942 }
943};
944
945// Re-check periodically so a long-running session picks up releases
946// without requiring a quit + relaunch. The boot-time check still runs;

Callers 2

setupAutoUpdaterFunction · 0.85
runUpdateCheckFunction · 0.85

Calls 1

setUpdateStatusFunction · 0.85

Tested by

no test coverage detected