|
nothing (#2388)
Under `set -euo pipefail`, task-done extracted the ledger's test-result
field with:
last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1)
When the test command passes but the log is empty or blank-only, `grep -v`
matches no lines and exits 1; pipefail propagates that through the
pipeline, and set -e aborts the assignment before the ledger line is
written. A passing task is then silently not recorded: exit 1, no stderr,
no ledger entry — indistinguishable from the failure path the guard exists
to produce.
Make the no-match case non-fatal, falling back to a literal placeholder for
the ledger field:
last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1) || last="(no output)"
The failure guard above this line (recording nothing when the test command
itself exits non-zero) is untouched.
Fixes #2385.
|