fix(scheduled-jobs): a file without a last newline no longer swallows the next header
driver / standard (pull_request) Successful in 15s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m4s
driver / test (3.12) (pull_request) Successful in 1m6s
driver / test (3.13) (pull_request) Successful in 1m4s
driver / build (pull_request) Successful in 32s
driver / lowest (pull_request) Successful in 41s
driver / security (pull_request) Successful in 1m13s
CI / driver (pull_request) Successful in 2m43s
driver / publish (pull_request) Skipped

GNU sed keeps a missing final newline, so the next section's header ran
on into the file's last line and its jobs were lost. The report ends
every such file with a newline of its own.

Refs #86
This commit is contained in:
christianmanivong committed 2026-11-03 05:50:44 +01:00
1 parent edef6cf07c
commit ffbb194300
2 files changed
+9 -1

No files matched your search

+3 -1
View File
@@ -86,7 +86,9 @@ def _q(path: str) -> str:
def _files(section: str, pattern: str) -> str:
return (
f'for f in {pattern}; do [ -f "$f" ] || continue; printf \'[%s %s]\\n\' {section} "$f"; '
'sed \'s/^/|/\' "$f"; P="$P\n$f"; done; '
# GNU sed keeps a missing last newline; without one of its own the next
# header would run on into the file's last line.
'sed \'s/^/|/\' "$f"; [ -n "$(tail -c 1 "$f")" ] && echo; P="$P\n$f"; done; '
)