Skip to content

Commit a2ce9a7

Browse files
authored
feat: Extending linux executableArgs option to be utilized for Snap target (fixes #4587) (#7198)
1 parent 5616f23 commit a2ce9a7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.changeset/empty-ligers-turn.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": major
3+
---
4+
5+
Extending `linux` executableArgs option to be utilized for Snap target

packages/app-builder-lib/src/targets/snap.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,19 @@ export default class SnapTarget extends Target {
195195
Icon: "${SNAP}/meta/gui/icon.png",
196196
})
197197

198+
const extraAppArgs: Array<string> = options.executableArgs ?? []
198199
if (this.isElectronVersionGreaterOrEqualThan("5.0.0") && !isBrowserSandboxAllowed(snap)) {
199-
args.push("--extraAppArgs=--no-sandbox")
200+
const noSandboxArg = "--no-sandbox"
201+
if (!extraAppArgs.includes(noSandboxArg)) {
202+
extraAppArgs.push(noSandboxArg)
203+
}
200204
if (this.isUseTemplateApp) {
201205
args.push("--exclude", "chrome-sandbox")
202206
}
203207
}
208+
if (extraAppArgs.length > 0) {
209+
args.push("--extraAppArgs=" + extraAppArgs.join(" "))
210+
}
204211

205212
if (snap.compression != null) {
206213
args.push("--compression", snap.compression)

0 commit comments

Comments
 (0)