3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 15:15:44 +01:00

A legged function chains with && : the || that captures the status suspends set -e

This commit is contained in:
2026-09-20 00:07:06 +02:00
parent ea1a6203fe
commit 2e20ac01f6
5 changed files with 47 additions and 40 deletions
+3 -5
View File
@@ -3,16 +3,14 @@ set -euo pipefail
cd "$(dirname "$0")"
source ./docker-runner.sh
test_log=$(mktemp)
leg "install ($node_image)" in_image "$node_image" npm ci
leg "typecheck ($node_image)" in_image "$node_image" npm run typecheck
# Streamed, and copied so the zero-test guard reads the count without trading the output for it.
test_log=$(mktemp)
node_tests() {
in_image "$node_image" npm test 2>&1 | tee "$test_log"
}
leg "install ($node_image)" in_image "$node_image" npm ci
leg "typecheck ($node_image)" in_image "$node_image" npm run typecheck
leg "tests ($node_image)" node_tests
if grep -q 'ℹ tests 0' "$test_log"; then
echo 'the gate ran zero tests — failing instead of a vacuous green'