ci: Fix printing info message at end of run-style-check-diff.sh

The changes in commit 95479256df4a4693845be6a48dd85974c5c1c6d5 didn’t
completely work (or some other change has broken them since): the
informational message at the end of the script is now not printed.

Fix that by stopping bash exiting immediately if the subshell exits, by
using it in a boolean expression.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2023-11-28 23:43:33 +00:00
parent 2ada5ba0f1
commit bfa2f9091f

View File

@ -5,14 +5,14 @@ set -e
ancestor_horizon=28 # days (4 weeks)
# Wrap everything in a subshell so we can propagate the exit status.
exit_status=0
(
source .gitlab-ci/search-common-ancestor.sh
git diff -U0 --no-color "${newest_common_ancestor_sha}" | .gitlab-ci/clang-format-diff.py -binary "clang-format-14" -p1
)
exit_status=$?
) || exit_status=$?
# The style check is not infallible. The clang-format configuration cannot
# perfectly describe GLibs coding style: in particular, it cannot align