Skip to content

Commit b7b2650

Browse files
committed
fix: strip carriage returns before sort -u to fix warning deduplication
Docker log lines contain \r (CRLF), causing sort -u to treat identical warning messages as distinct lines. Pipe through tr -d '\r' before sort -u so duplicate warnings collapse to a single annotation entry.
1 parent f7c391f commit b7b2650

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
- name: Annotate install warnings
9898
if: always()
9999
run: |
100-
mapfile -t warnings < <(grep -oP '(?<=claude-code feature\] WARNING: ).*' /tmp/scenario-test-output.log 2>/dev/null | sort -u || true)
100+
mapfile -t warnings < <(grep -oP '(?<=claude-code feature\] WARNING: ).*' /tmp/scenario-test-output.log 2>/dev/null | tr -d '\r' | sort -u || true)
101101
if [[ ${#warnings[@]} -gt 0 ]]; then
102102
echo "## :warning: Install Warnings" >> "$GITHUB_STEP_SUMMARY"
103103
for msg in "${warnings[@]}"; do
@@ -182,7 +182,7 @@ jobs:
182182
- name: Annotate install warnings
183183
if: always()
184184
run: |
185-
mapfile -t warnings < <(grep -oP '(?<=claude-code feature\] WARNING: ).*' /tmp/test-output.log 2>/dev/null | sort -u || true)
185+
mapfile -t warnings < <(grep -oP '(?<=claude-code feature\] WARNING: ).*' /tmp/test-output.log 2>/dev/null | tr -d '\r' | sort -u || true)
186186
if [[ ${#warnings[@]} -gt 0 ]]; then
187187
echo "## :warning: Install Warnings" >> "$GITHUB_STEP_SUMMARY"
188188
for msg in "${warnings[@]}"; do
@@ -244,7 +244,7 @@ jobs:
244244
- name: Annotate install warnings
245245
if: always()
246246
run: |
247-
mapfile -t warnings < <(grep -oP '(?<=claude-code feature\] WARNING: ).*' /tmp/test-output.log 2>/dev/null | sort -u || true)
247+
mapfile -t warnings < <(grep -oP '(?<=claude-code feature\] WARNING: ).*' /tmp/test-output.log 2>/dev/null | tr -d '\r' | sort -u || true)
248248
if [[ ${#warnings[@]} -gt 0 ]]; then
249249
echo "## :warning: Install Warnings" >> "$GITHUB_STEP_SUMMARY"
250250
for msg in "${warnings[@]}"; do

0 commit comments

Comments
 (0)