Skip to content

Commit 83d34b3

Browse files
committed
build: fix format-cpp
According to the logs in nodejs#42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: nodejs#42681 (comment) Signed-off-by: Darshan Sen <[email protected]>
1 parent 24adba6 commit 83d34b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/linters.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ jobs:
7070
- name: Format C/C++ files
7171
run: |
7272
make format-cpp-build
73+
# The `make format-cpp` error code is intentionally ignored here
74+
# because it is irrelevant. We already check if the formatter produced
75+
# a diff in the next line.
76+
# Refs: https://github.com/nodejs/node/pull/42764
7377
CLANG_FORMAT_START="$(git merge-base HEAD refs/remotes/origin/$GITHUB_BASE_REF)" \
74-
make format-cpp
78+
make format-cpp || true
7579
git --no-pager diff --exit-code && EXIT_CODE="$?" || EXIT_CODE="$?"
7680
if [ "$EXIT_CODE" != "0" ]
7781
then

0 commit comments

Comments
 (0)