-
Notifications
You must be signed in to change notification settings - Fork 963
Fix auto update #3278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix auto update #3278
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| import { EventEmitter } from "node:events"; | ||
| import { app, dialog } from "electron"; | ||
| import { BrowserWindow, app, dialog } from "electron"; | ||
| import { autoUpdater } from "electron-updater"; | ||
| import { env } from "main/env.main"; | ||
| import { exitImmediately } from "main/index"; | ||
| import { quitApp } from "main/index"; | ||
| import { prerelease } from "semver"; | ||
| import { AUTO_UPDATE_STATUS, type AutoUpdateStatus } from "shared/auto-update"; | ||
| import { PLATFORM } from "shared/constants"; | ||
|
|
@@ -91,10 +91,8 @@ export function installUpdate(): void { | |
| emitStatus(AUTO_UPDATE_STATUS.IDLE); | ||
| return; | ||
| } | ||
| setSkipQuitConfirmation(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In // In apps/desktop/src/main/index.ts — add and export this function
export function setSkipQuitConfirmation(): void {
skipQuitConfirmation = true;
}Then import it in import { quitApp, setSkipQuitConfirmation } from "main/index";Without this fix the update install path is completely broken. |
||
| autoUpdater.quitAndInstall(false, true); | ||
| // MacUpdater.quitAndInstall() may not quit if Squirrel hasn't | ||
| // finished its internal download from the localhost proxy. | ||
| exitImmediately(); | ||
| } | ||
|
|
||
| export function dismissUpdate(): void { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BrowserWindowimportBrowserWindowwas added to the import on this line but is never referenced anywhere in the file. This will likely trigger a lint/compiler warning and should be removed.