Printing the environment can fail on CI when running against a commit
whose author name or commit message contains non-ASCII characters. These
values are put into the CI environment in UTF-8 as, for example, the
CI_COMMIT_AUTHOR environment variable, by GitLab.
The CI environment on Windows is not set up with a UTF-8 codepage for
console output, so when Python tries to print the environment, it fails
Arguably either (or both):
- GitLab should be encoding the environment values in the same codepage as it subsequently runs the CI job in.
- The CI configuration in
.gitlab-ci.ymlshould switch to a UTF-8 codepage for the sanity of anyone who uses GLib’s CI system.
But both of those are harder to fix, and this problem has blocked multiple pending merge requests in the last week. So this commit, which is defnitely a temporarily workaround, is proposed.
Printing the environment was originally added to help debug problems with running subprocesses in the tests, so should not be needed on a day-to-day basis.
Signed-off-by: Philip Withnall firstname.lastname@example.org
Helps: #2915 (closed)
Closes #2915 (closed)