Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#74034 - [electron] Launcher: Give options from electron-flags before "$@"

Attached to Project: Community Packages
Opened by Mynacol (mynacol) - Saturday, 05 March 2022, 10:31 GMT
Last edited by Andreas Radke (AndyRTR) - Saturday, 05 March 2022, 10:53 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Nicola Squartini (tensor5)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description:
Option flags from ~/.config/electron-flags.conf are nice to change electron's behavior.
Unfortunately, this breaks if an electron application is launched with `--` as parameter, e.g. `electron /usr/lib/element/app.asar --`, as the double dash marks the end of electron options.
This is caused by appending any flags in electron-flags.conf at the end instead of the beginning of the electron parameters.
I propose to add them at the beginning, as they should only affect electron options, nothing application-specific.

This might break for some people, but is a better way going forward IMO.
This is also in line with the electron help:
```
$ electron -h
Usage: electron [options] [path]
[...]
```

In the launcher script:
```
-exec /usr/lib/${name}/electron "$@" "${flags[@]}"
+exec /usr/lib/${name}/electron "${flags[@]}" "$@"
```
Additional Info:
- electron 17.1.0-1 (but any prior electron version does this)
This task depends upon

Loading...