Message ID | 34daf06bb710434a2392b3cb91d35047565d5602.1655125988.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | cadcafc3311de7f6fae5f3add10cde4f93268ff8 |
Headers | show |
Series | ci(GitHub): mark up compile errors, too | expand |
diff --git a/ci/lib.sh b/ci/lib.sh index 2f6d9d26e40..aa7e979a0bf 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -29,8 +29,14 @@ else set +x begin_group "$1" shift - "$@" - res=$? + # work around `dash` not supporting `set -o pipefail` + ( + "$@" 2>&1 + echo $? >exit.status + ) | + sed 's/^\(\([^ ]*\):\([0-9]*\):\([0-9]*:\) \)\(error\|warning\): /::\5 file=\2,line=\3::\1/' + res=$(cat exit.status) + rm exit.status end_group return $res }