Skip to content

Commit 85b27f6

Browse files
committed
Fix run_clang_tidy.sh not work on macOS
1 parent de8d5f5 commit 85b27f6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build-support/run_clang_tidy.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,10 @@ for FILE in $FILES; do
3131
done
3232
# run-clang-tidy from older version of LLVM requires python but not python3 as the env, so we cannot run it directly
3333
SCRIPT=$(which run-clang-tidy)
34-
python3 $SCRIPT -p build -j $(nproc) $(cat files.txt)
34+
set +e
35+
nproc
36+
if [[ $? == 0 ]]; then
37+
python3 $SCRIPT -p build -j$(nproc) $(cat files.txt)
38+
else
39+
python3 $SCRIPT -p build -j8 $(cat files.txt)
40+
fi

0 commit comments

Comments
 (0)