Skip to content

Commit cd3133b

Browse files
committed
ci: expand sudo-install stderr diagnostic (head+tail, strip ANSI)
1 parent c700b49 commit cd3133b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ jobs:
145145
rc=$?
146146
set -e
147147
echo "::warning::diag install-exit: $rc"
148-
echo "::warning::diag pkgm-stderr-head: $(head -c 600 /tmp/pkgm-sudo.stderr 2>/dev/null | tr '\n' '|' || echo none)"
148+
# Dump stderr in chunks (annotations are limited to ~4KB each).
149+
stripped=$(sed -E 's/\x1b\[[0-9;]*[A-Za-z]//g; s/\r//g' /tmp/pkgm-sudo.stderr 2>/dev/null || true)
150+
echo "::warning::diag stderr-len: ${#stripped}"
151+
echo "::warning::diag stderr-tail: $(echo "$stripped" | tail -c 1500 | tr '\n' '|' || echo none)"
152+
echo "::warning::diag stderr-head: $(echo "$stripped" | head -c 1500 | tr '\n' '|' || echo none)"
149153
echo "::warning::diag user-new: $(sudo find $HOME/.pkgx -newer /tmp/pkgm-sudo-marker -print 2>/dev/null | head -6 | tr '\n' '|' || echo none)"
150154
echo "::warning::diag roothome: $(eval echo ~root)"
151155
echo "::warning::diag roothome-new: $(sudo find $(eval echo ~root)/.pkgx -newer /tmp/pkgm-sudo-marker -print 2>/dev/null | head -6 | tr '\n' '|' || echo none)"

0 commit comments

Comments
 (0)