From a074684110c51be8f21a086ae1099e5935aaa0a3 Mon Sep 17 00:00:00 2001 From: Suvesh Pratapa <66088488+suveshpratapa@users.noreply.github.com> Date: Tue, 14 May 2024 11:42:54 -0400 Subject: [PATCH] [clang-format] accept different patch versions of `clang-format` (#10042) 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 e31466d22..bd1120ee8 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"