fix(desktop): filter --no-sandbox from CLI arg parsing on Linux
The Linux wrapper injects --no-sandbox for Electron sandboxing, but the CLI parser was treating it as an unknown Paseo option. Filter it out alongside the existing macOS -psn_ prefix.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const IGNORED_GUI_LAUNCH_ARG_PREFIX = "-psn_";
|
||||
const IGNORED_ARG_PREFIXES = ["-psn_", "--no-sandbox"];
|
||||
|
||||
export const DESKTOP_CLI_ENV = "PASEO_DESKTOP_CLI";
|
||||
|
||||
@@ -44,7 +44,7 @@ export function parseCliPassthroughArgsFromArgv(
|
||||
const startIndex = input.isDefaultApp ? 2 : 1;
|
||||
const effective = input.argv
|
||||
.slice(startIndex)
|
||||
.filter((arg) => !arg.startsWith(IGNORED_GUI_LAUNCH_ARG_PREFIX));
|
||||
.filter((arg) => !IGNORED_ARG_PREFIXES.some((p) => arg.startsWith(p)));
|
||||
|
||||
if (input.forceCli) {
|
||||
return effective;
|
||||
|
||||
Reference in New Issue
Block a user