Skip to content

Commit c2157b8

Browse files
committed
fix: strip wrapper debug annotations before jq validation in test
When use_wrapper=true, @actions/exec writes stackql's stdout directly to the wrapper process's stdout AND the wrapper emits ::debug:: annotations via core.debug(). Since the JSON output has no trailing newline, the debug text is appended on the same line (e.g. [{...}]::debug::StackQL exited...). Strip all ::name::value GitHub Actions workflow commands from captured output before piping to jq. https://claude.ai/code/session_01Y8NseCm28GqE8nQ1Yvg5aa
1 parent 7accc79 commit c2157b8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/setup-stackql-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
echo "Registry list output:"
3636
echo "$OUTPUT"
3737
38+
# When the wrapper is active, @actions/exec writes stackql's stdout directly to the
39+
# wrapper process's stdout, and core.debug() appends ::debug:: annotations immediately
40+
# after (on the same line, since the JSON has no trailing newline). Strip all GitHub
41+
# Actions workflow commands (::name::value) before handing the output to jq.
42+
CLEAN_JSON=$(echo "$OUTPUT" | sed 's/::[a-z-]*::.*$//' | grep -v '^[[:space:]]*$')
43+
3844
# Validate JSON structure: array of objects each with provider and version keys
39-
echo "$OUTPUT" | jq -e 'type == "array" and (all(.[]; has("provider") and has("version")))' > /dev/null
45+
echo "$CLEAN_JSON" | jq -e 'type == "array" and (all(.[]; has("provider") and has("version")))' > /dev/null
4046
echo "Registry list validated successfully."

0 commit comments

Comments
 (0)