Skip to content

Commit e4f8a50

Browse files
authored
fix: resolve broken pipe and JSONDecodeError in poll-validation.sh (#511)
1 parent 07c5324 commit e4f8a50

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/scripts/poll-validation.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,13 @@ while [[ $SECONDS -lt $end ]]; do
9999
exit 0
100100
else
101101
echo "FAILED: ${RUNTIME}"
102-
echo "$result" | python3 - <<'PYEOF'
103-
import json, sys
104-
d = json.load(sys.stdin)
102+
# Write result to a temp file — avoids the bash stdin conflict between
103+
# a pipe and a heredoc both trying to own python3's stdin (broken pipe bug).
104+
printf '%s' "$result" > /tmp/val_result.json
105+
python3 <<'PYEOF'
106+
import json
107+
with open('/tmp/val_result.json') as f:
108+
d = json.load(f)
105109
for variant in ("standard", "slim"):
106110
section = d.get(variant) or {}
107111
for f in section.get("functions", []):

0 commit comments

Comments
 (0)