From 003f45ecda12f5bd204f8768080b8342e17b5ab1 Mon Sep 17 00:00:00 2001 From: Suvesh Pratapa Date: Thu, 18 Apr 2024 10:37:51 -0400 Subject: [PATCH] [clang-format] improve check for clang-format to accept Homebrew version Homebrew installation of clang-format (satisfying >14.0 requirement) outputs the following version string: ``` Homebrew clang-format version 14.0.6 ``` This change fixes the following error while running make-pretty: ``` *** ERROR: Homebrew clang-format version 14.0.6; clang-format 14.0 required ``` --- script/clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/clang-format b/script/clang-format index e31466d22b5..bd1120ee8e1 100755 --- a/script/clang-format +++ b/script/clang-format @@ -43,7 +43,7 @@ if command -v clang-format-14 >/dev/null; then alias clang-format=clang-format-14 elif command -v clang-format >/dev/null; then case "$(clang-format --version)" in - "$CLANG_FORMAT_VERSION"*) ;; + *"$CLANG_FORMAT_VERSION"*) ;; *) die "$(clang-format --version); clang-format 14.0 required"