File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,19 +167,23 @@ jobs:
167167 continue
168168 fi
169169
170- # Execute SFW diff (sfw handles its own sandboxing internally)
171- if ! OUTPUT=$(./bin/sfw diff "$OLD_FILE" "$NEW_FILE" 2>&1); then
170+ # Execute SFW diff (sfw handles its own sandboxing internally).
171+ # Capture STDOUT (the JSON report) only -- sfw writes warnings/errors
172+ # to stderr (e.g. the "runsc not found, falling back" notice), and
173+ # merging them with 2>&1 corrupts the JSON parsed below.
174+ if ! OUTPUT=$(./bin/sfw diff "$OLD_FILE" "$NEW_FILE" 2>sfw_stderr.log); then
172175 echo "::error::sfw failed to process $NEW_FILE_REF"
173176 # Surface the tool's actual error instead of swallowing it.
174- printf '%s\n' "$OUTPUT" | sed 's/^/ [sfw] /'
177+ sed 's/^/ [sfw] /' sfw_stderr.log
175178 ERROR_COUNT=$((ERROR_COUNT + 1))
176179 continue
177180 fi
178181
179182 # Validate JSON
180183 if ! echo "$OUTPUT" | jq -e . >/dev/null 2>&1; then
181184 echo "::error::Invalid JSON output for $NEW_FILE_REF"
182- printf '%s\n' "$OUTPUT" | sed 's/^/ [sfw] /'
185+ printf '%s\n' "$OUTPUT" | sed 's/^/ [out] /'
186+ sed 's/^/ [sfw] /' sfw_stderr.log
183187 ERROR_COUNT=$((ERROR_COUNT + 1))
184188 continue
185189 fi
You can’t perform that action at this time.
0 commit comments