From 096add378dfcf04938387d122f2a81a415f7f821 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Thu, 13 Feb 2025 11:25:27 +0100 Subject: [PATCH] Be more explicit about clang-format version (#91) * Be more explicit about clang-format version * Fall back to clang-format if v14 is not available --- bin/indent | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/indent b/bin/indent index 4c8cbc481..8c2e4c330 100755 --- a/bin/indent +++ b/bin/indent @@ -69,10 +69,18 @@ else RUN_IF_OK='true' fi -CLANG_FORMAT=clang-format if [ "$(hostname)" == "persee.partenaires.cea.fr" ] then CLANG_FORMAT=/data/gyselarunner/clang-format +else + CLANG_FORMAT=clang-format-14 + set +e + if ! command -v ${CLANG_FORMAT} 2>&1 >/dev/null + then + CLANG_FORMAT=clang-format + echo "Could not find clang-format v14. Clang-formatting may not behave as expected" + fi + set -e fi ${DOCKER_COMMAND} find \