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 29, 2024
1 parent 2408c89 commit e7f503b
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 e7f503b

Please sign in to comment.