summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rwxr-xr-x.github/diag.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/.github/diag.sh b/.github/diag.sh
index 56b5fcb..d89e7a4 100755
--- a/.github/diag.sh
+++ b/.github/diag.sh
@@ -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)