diff --git a/src/electron.ts b/src/electron.ts index b2add49..b8d71d5 100644 --- a/src/electron.ts +++ b/src/electron.ts @@ -1,5 +1,6 @@ import path from 'node:path' import fs from 'node:fs' +import os from 'node:os' import { createRequire } from 'node:module' import { type ChildProcess, spawn } from 'node:child_process' @@ -122,6 +123,10 @@ export function startElectron(root: string | undefined): ChildProcess { const args: string[] = [] + if (os.userInfo().uid == 0 && isDev) { + args.push(`--no-sandbox`); + } + if (!!process.env.REMOTE_DEBUGGING_PORT && isDev) { args.push(`--remote-debugging-port=${process.env.REMOTE_DEBUGGING_PORT}`) }