Arch Linux

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#79438 - [code] Code flags are used as Electron flags when no Electron flags are defined

Attached to Project: Arch Linux
Opened by Daniel Peukert (dpeukert) - Tuesday, 22 August 2023, 09:36 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Monday, 11 September 2023, 16:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Massimiliano Torromeo (mtorromeo)
Filipe LaĆ­ns (FFY00)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

As the mapfile calls for Code and Electron flags use the same default variable name, the situation described in the bug title causes the Code flags to be duplicated.

A patch with a fix:

```
diff --git a/code.sh b/code.sh
index ff841c1..7bb44e9 100644
--- a/code.sh
+++ b/code.sh
@@ -7,10 +7,10 @@ flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/code-flags.conf"
declare -a codeflags

if [[ -f "${flags_file}" ]]; then
- mapfile -t < "${flags_file}"
+ mapfile -t < "${flags_file}" CODEMAPFILE
fi

-for line in "${MAPFILE[@]}"; do
+for line in "${CODEMAPFILE[@]}"; do
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
codeflags+=("${line}")
fi
@@ -23,10 +23,10 @@ flags_file="${XDG_CONFIG_HOME:-$HOME/.config}/${name}-flags.conf"
declare -a electronflags

if [[ -f "${flags_file}" ]]; then
- mapfile -t < "${flags_file}"
+ mapfile -t < "${flags_file}" ELECTRONMAPFILE
fi

-for line in "${MAPFILE[@]}"; do
+for line in "${ELECTRONMAPFILE[@]}"; do
if [[ ! "${line}" =~ ^[[:space:]]*#.* ]]; then
electronflags+=("${line}")
fi
```
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Monday, 11 September 2023, 16:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  code-1.82.0-2
Comment by Daniel Peukert (dpeukert) - Tuesday, 22 August 2023, 09:37 GMT
Dammit, forgot that Markdown isn't a thing in Flyspray, I've attached the patch as a file.

Loading...