Skip to content

Commit fa99f50

Browse files
authored
Fix clang-tidy (#7476)
Without this fix, error-on-exit makes us error without printing the diff.
1 parent c528c7e commit fa99f50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/clang-tidy-diff.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if [ ! -e "$CLANG_TIDY_DIFF" ]; then
2929
echo "Failed to find clang-tidy-diff.py ($CLANG_TIDY_DIFF)"
3030
exit 1
3131
fi
32-
TIDY_MSG=$(git diff -U0 $BRANCH... | $CLANG_TIDY_DIFF $ARG 2> /dev/null)
32+
TIDY_MSG=$(git diff -U0 $BRANCH... | $CLANG_TIDY_DIFF $ARG 2> /dev/null || true)
3333
if [ -n "$TIDY_MSG" -a "$TIDY_MSG" != "No relevant changes found." ]; then
3434
echo "Please fix clang-tidy errors before committing"
3535
echo

0 commit comments

Comments
 (0)