Skip to content

Commit e4ac406

Browse files
Merge pull request #869 from ClickHouse/fix-generator-skip-malformed
Skip malformed entries in generate-results.sh
2 parents 227d654 + 814ab23 commit e4ac406

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

generate-results.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ LANG="" ls -1 */results/*/*.json \
1616
| sort \
1717
| while read -r file
1818
do
19-
[ "${FIRST}" = "0" ] && echo -n ','
20-
jq --compact-output ". += {\"source\": \"${file}\"}" "${file}" || echo "Error in $file" >&2
21-
FIRST=0
19+
if entry=$(jq --compact-output ". += {\"source\": \"${file}\"}" "${file}"); then
20+
[ "${FIRST}" = "0" ] && echo -n ','
21+
printf '%s\n' "$entry"
22+
FIRST=0
23+
else
24+
echo "Error in $file — skipping" >&2
25+
fi
2226
done >> data.generated.js.new
2327
echo '];' >> data.generated.js.new
2428

0 commit comments

Comments
 (0)