ubuntu not working. idk I'm just gonna use windows anyway

This commit is contained in:
2026-06-26 18:00:22 -05:00
parent 3c5c520799
commit 0325b6efbc
14 changed files with 214 additions and 16 deletions
+19
View File
@@ -7,6 +7,7 @@ const path = require('node:path');
const {
buildMissingElectronError,
linuxSandboxLaunchArgs,
repairElectronInstall,
resolveElectronBinary,
} = require('../../scripts/electron-launcher');
@@ -171,3 +172,21 @@ test('reports a helpful error when the runtime is missing', (t) => {
assert.match(message, /Electron could not be started/);
assert.match(message, /Expected the binary in:/);
});
test('uses --no-sandbox when the Linux sandbox helper is not root-owned and setuid', () => {
const args = linuxSandboxLaunchArgs({
electronPath: '/tmp/stepforge/node_modules/electron/dist/electron',
platform: 'linux',
statSync: () => ({ uid: 1000, mode: 0o100755 }),
});
assert.deepEqual(args, ['--no-sandbox']);
});
test('keeps the sandbox enabled when the Linux helper is root-owned and setuid', () => {
const args = linuxSandboxLaunchArgs({
electronPath: '/tmp/stepforge/node_modules/electron/dist/electron',
platform: 'linux',
statSync: () => ({ uid: 0, mode: 0o104755 }),
});
assert.deepEqual(args, []);
});