Homebrew PR

【エラー解決】homebrew-core is a shallow clone

記事内に商品プロモーションを含む場合があります

homebrewで『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
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
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!

エラー原因:homebrew-core is a shallow clone

このエラーの原因はは、再フェッチできないことが原因です。

そのため、homebrew-core を再度設定すれば解決します

エラー解決

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

こちらを実行後に、再度下記を行えば解決します

brew update