Skip to content

Commit fdb3004

Browse files
authored
Merge pull request #482 from Hyperloop-UPV/develop
Prepare Release 11.0.1
2 parents 6f4d632 + c069130 commit fdb3004

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

electron-app/main.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import { app, BrowserWindow, dialog, screen } from "electron";
88
import pkg from "electron-updater";
9-
import fs from "fs";
109
import { getConfigManager } from "./src/config/configInstance.js";
1110
import { setupIpcHandlers } from "./src/ipc/handlers.js";
1211
import { startBackend, stopBackend } from "./src/processes/backend.js";
@@ -17,13 +16,6 @@ import { createWindow } from "./src/windows/mainWindow.js";
1716

1817
const { autoUpdater } = pkg;
1918

20-
// Disable sandbox on Linux — sandbox restrictions vary across distros
21-
// (AppArmor on Ubuntu, SELinux on Fedora, etc.) and this is an internal
22-
// app where all content is trusted.
23-
if (process.platform === "linux") {
24-
app.commandLine.appendSwitch("no-sandbox");
25-
}
26-
2719
// Setup IPC handlers for renderer process communication
2820
setupIpcHandlers();
2921

electron-app/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@
111111
],
112112
"icon": "icons/512x512.png",
113113
"category": "Utility",
114-
"artifactName": "${productName}-${version}-linux-${arch}.${ext}"
114+
"artifactName": "${productName}-${version}-linux-${arch}.${ext}",
115+
"executableArgs": ["--no-sandbox"]
115116
}
116117
}
117118
}

electron-app/src/processes/backend.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ async function startBackend(logWindow = null) {
7979
logger.backend.info(text);
8080

8181
// Send log message to log window
82-
if (currentLogWindow && !currentLogWindow.isDestroyed()) {
82+
if (
83+
currentLogWindow &&
84+
!currentLogWindow.isDestroyed() &&
85+
currentLogWindow.webContents
86+
) {
8387
const htmlData = convert.toHtml(text);
8488
currentLogWindow.webContents.send("log", htmlData);
8589
}

0 commit comments

Comments
 (0)