ubuntu not working. idk I'm just gonna use windows anyway
This commit is contained in:
@@ -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, []);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user