Skip to content

Commit

Permalink
ci/diag.sh: Try to make sed unbuffered
Browse files Browse the repository at this point in the history
  • Loading branch information
tavianator committed Feb 3, 2025
1 parent 1ef2935 commit 1b79747
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@

set -eu

SEDFLAGS="-En"
if sed -u 's/s/s/' </dev/null &>/dev/null; then
SEDFLAGS="${SEDFLAGS}u"
fi

filter() {
sed -En 'p; s/^([^:]*):([^:]*):([^:]*): (warning|error): (.*)$/::\4 file=\1,line=\2,col=\3,title=Compiler \4::\5/p'
sed $SEDFLAGS 'p; s/^([^:]*):([^:]*):([^:]*): (warning|error): (.*)$/::\4 file=\1,line=\2,col=\3,title=Compiler \4::\5/p'
}

exec "$@" > >(filter) 2> >(filter >&2)

0 comments on commit 1b79747

Please sign in to comment.