CI: Print warnigns on stderr as well
What does this MR do and why?
This side steps sync problems in CI trace logs and makes printing consistent.
For example: https://gitlab.com/gitlab-org/gitlab/-/jobs/3525673683.
Refs #386693 (comment 1221407748)
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Create
foo.sh
and make it executable withchmod a+x foo.sh
:
#!/bin/bash
warn() {
echo "$*" >&2
}
warn "foo"
warn "Type application/netcdf is already registered as a variant of application/netcdf."
- Test via
fail_on_warnings ./foo.sh
- Silence stdout via
fail_on_warnings ./foo.sh >/dev/null
- Silence stderr via
fail_on_warnings ./foo.sh 2>/dev/null
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Leitzen