This line isn't posix shell compatible
https://github.com/maltzj/google-style-precommit-hook/blob/95c2f5632710e095220e22cc1a4e1a1451abf75f/format-code.sh#L11
$(command) is a bash or other new shell issue. On many systems sh is a posix limited shell.
This issue is fixed in https://github.com/maltzj/google-style-precommit-hook/pull/17
The $(command) command substitution is part of the POSIX standard and is not a bashism. It should work in POSIX compliant shells. If it doesn't work in your shell, it appears your shell isn't POSIX compliant.
2.6.3 Command Substitution Command substitution allows the output of a command to be substituted in place of the command name itself. Command substitution shall occur when the command is enclosed as follows:
$(command)
or (backquoted version):
command
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03