Skip to content

Commit 9afe882

Browse files
authored
fix(ci): strip ANSI codes from nx report output (#7992)
nx report emits ANSI color/bold escape sequences which caused grep to fail matching version lines (e.g. ^nx), crashing the Build NX Report MDX step under set -euo pipefail.
1 parent 87addf4 commit 9afe882

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/ci-weekly-nx-report.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ jobs:
114114
id: nx-report
115115
run: |
116116
set -euo pipefail
117-
pnpm nx report > /tmp/nx-report-raw.txt 2>&1 || true
117+
# Capture report and strip ANSI color/bold codes that nx emits
118+
pnpm nx report 2>&1 | sed 's/\x1b\[[0-9;]*m//g' > /tmp/nx-report-raw.txt || true
118119
echo "report_date=$(date -u +%Y-%m-%d)" >> "$GITHUB_OUTPUT"
119120
echo "report_timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
120121

0 commit comments

Comments
 (0)