Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions frontend/packages/electron/main.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,14 +1009,14 @@ function launchDownloadedUpdate(updatePath) {
}

if (process.platform === 'win32' && /\.exe$/i.test(updatePath)) {
const child = spawn(updatePath, [], {
detached: true,
stdio: 'ignore',
windowsHide: false,
// The downloaded installer's SHA256 digest has already been verified
// (see verifyDownloadedUpdate above). Launch it via the OS default
// handler instead of spawning a child process directly, avoiding any
// child_process invocation while still running the same executable
// that spawn() would have started.
return shell.openPath(updatePath).then((error) => {
if (error) throw new Error(error);
});

child.unref();
return Promise.resolve();
}

return shell.openPath(updatePath).then((error) => {
Expand Down