Skip to content

fix(ci): keep sfw diff stderr out of the parsed JSON#27

Merged
svczero merged 1 commit into
mainfrom
fix/ci-stderr-json
Jun 11, 2026
Merged

fix(ci): keep sfw diff stderr out of the parsed JSON#27
svczero merged 1 commit into
mainfrom
fix/ci-stderr-json

Conversation

@svczero

@svczero svczero commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the Go-toolchain fix. Now that sfw diff actually produces output, the workflow's 2>&1 prepended sfw's ::warning::'runsc' not found (stderr) to the JSON, so jq rejected it as Invalid JSON. Capture stdout only; route stderr to a log printed on failure. Verified locally: with 2>&1 jq exits 5; with stderr separated jq parses a valid semantic_match_pct.

sfw writes warnings to stderr (e.g. the 'runsc not found, falling back to direct execution' notice). The diff loop captured them with 2>&1, so the warning was prepended to the JSON and 'jq' rejected it as Invalid JSON once sfw diff actually started producing output. Redirect stderr to a log instead; print it only on failure.
@svczero svczero merged commit a257044 into main Jun 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant