brew install エラー

brew install でエラー発生.

>  brew install --build-from-source openjdk
  homebrew-core is a shallow clone.


Warning: You are using macOS 12.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
pre-release version.

エラー内容にある通り,どうやらshallow clone を使用しないように設定する必要があるようです.

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow


brew update