When running from the Linux snap, use no-sandbox

This commit is contained in:
Ben Gotow 2021-04-13 10:59:18 -05:00 committed by Ben Gotow
parent a34a40add7
commit 21808541a8

View file

@ -258,6 +258,11 @@ export default class Application extends EventEmitter {
// Configures required javascript environment flags.
setupJavaScriptArguments() {
if (process.env.SNAP && process.platform === 'linux') {
// https://snapcraft.io/docs/browser-support-interface
// https://github.com/electron-userland/electron-builder/blob/df5d050e47f2030e48e65c0e3b542c3aec61e9de/packages/app-builder-lib/src/targets/snap.ts#L197-L202
app.commandLine.appendSwitch('no-sandbox');
}
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required');
app.commandLine.appendSwitch('js-flags', '--harmony');
}