Skip to content

Commit 1e232c9

Browse files
committed
fix: sandbox NSS error in container (ignore-certificate-errors)
1 parent 71c4736 commit 1e232c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ app.commandLine.appendSwitch('log-level', '3');
7979

8080
// Fix NSS pour distrobox/conteneurs : utiliser une base de données NSS en mémoire
8181
// Évite les conflits avec la base NSS de l'hôte partagée via /home
82-
if (fs.existsSync('/run/.containerenv') || fs.existsSync('/run/.toolboxenv') || process.env.container === 'podman' || process.env.container === 'docker') {
82+
if (fs.existsSync('/run/.containerenv') || fs.existsSync('/run/.toolboxenv')) {
8383
app.commandLine.appendSwitch('use-mock-keychain');
84+
app.commandLine.appendSwitch('ignore-certificate-errors-spki-list');
85+
app.commandLine.appendSwitch('ignore-certificate-errors');
8486
}
8587

8688
const errorLogPath = path.join(app.getPath('userData'), 'error.log');
@@ -1052,7 +1054,6 @@ ipcMain.handle('sandbox-configure', async (event, payload = {}) => {
10521054
else if (payload.configureDirs === false) shouldConfigure = false;
10531055
else shouldConfigure = hasDirSelection || hasCustomPath;
10541056
const stdinScript = buildSandboxAnswerScript(shouldConfigure, dirSelections, customCheck.value);
1055-
10561057
const args = ['--sandbox', normalizedName];
10571058
const result = await runSandboxTask(event.sender, {
10581059
pm,
@@ -1070,7 +1071,6 @@ ipcMain.handle('sandbox-disable', async (event, payload = {}) => {
10701071
if (!pm) return { ok: false, error: 'missing-pm' };
10711072
const normalizedName = typeof payload.appName === 'string' ? payload.appName.trim() : '';
10721073
if (!normalizedName) return { ok: false, error: 'invalid-app' };
1073-
10741074
const args = ['--disable-sandbox', normalizedName];
10751075
const result = await runSandboxTask(event.sender, {
10761076
pm,

0 commit comments

Comments
 (0)