emolog

脳内メモです。

brew updateで `homebrew-core / homebrew-cask is a shallow clone. `と怒られる

f:id:ababababa0222:20210312000009j:plain

Macにて、 brew update を実行しようとしたら怒られた

$ brew update
Error:
homebrew-core is a shallow clone.
homebrew-cask is a shallow clone.
To brew update, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
These commands may take a few minutes to run due to the large size of the repositories.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in

エラーにこうしてね、ってコマンドがあるので、それに沿って下記のコマンドを実行

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

結構時間がかかりました。

再度

brew upgrade して終了