Skip to content

Commit 8c94b87

Browse files
committed
Fix shellcheck issue with array
1 parent 31121be commit 8c94b87

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

steps/report.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ st_list=${TARGET}/temp/structured-list-of-metrics.tex
5252
rm -f "${st_list}"
5353
touch "${st_list}"
5454

55-
groups=($(grep -oP '\[.*?\]' "${list}" | sed 's/[][]//g' || : ) "Ungrouped metrics")
55+
groups=()
56+
while IFS='' read -r line; do
57+
groups+=("$line")
58+
done < <(grep -oP '\[.*?\]' "${list}" | sed 's/[][]//g' || : ; echo "Ungrouped metrics")
5659
for idx in ${!groups[@]}; do
5760
printf "\\item %s\n" "${groups[$idx]}" >> "${st_list}"
5861
printf "\\\\begin{itemize}\n" >> "${st_list}"

0 commit comments

Comments
 (0)