Skip to content

Commit

Permalink
[clang-format] improve check for clang-format to accept Homebrew version
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
suveshpratapa committed Apr 18, 2024
1 parent be7d36e commit 3440230
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion script/clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 3440230

Please sign in to comment.