Merge pull request 'fix: EXIT trap omits container teardown on script interruption (#862)' (#963) from fix/issue-862 into master

This commit is contained in:
johba 2026-03-18 15:06:17 +01:00
commit 4ee3e72ae1

View file

@ -51,7 +51,7 @@ SMOKE_SEED="${seeds[$SMOKE_IDX]}"
SMOKE_NAME=$(basename "$SMOKE_SEED" .push3)
log "Smoke test: $SMOKE_NAME"
cp "$OPT_SOL" "${OPT_SOL}.sweep-backup"
trap 'cp "${OPT_SOL}.sweep-backup" "$OPT_SOL" 2>/dev/null; rm -f "${OPT_SOL}.sweep-backup"' EXIT
trap 'cp "${OPT_SOL}.sweep-backup" "$OPT_SOL" 2>/dev/null; rm -f "${OPT_SOL}.sweep-backup"; docker compose -f "$REPO_ROOT/docker-compose.yml" down -v 2>/dev/null || true' EXIT
bash "$INJECT" "$SMOKE_SEED" "$OPT_SOL" || die "Smoke test inject failed for $SMOKE_NAME"
(cd "$REPO_ROOT/onchain" && forge build --silent 2>&1) || die "Smoke test compile failed for $SMOKE_NAME"