ひさしぶりにHomebrewを入れ直そうとして、
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
や
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
を試みると以下のエラーが出た。
fatal: couldn't find remote ref refs/heads/master
Error: Fetching /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart failed!
Installing from the API is now the default behaviour!
You can save space and time by running:
brew untap homebrew/core
brew untap homebrew/cask
Error: Some taps failed to update!
The following taps can not read their remote branches:
dart-lang/dart
This is happening because the remote branch was renamed or deleted.
Reset taps to point to the correct remote branches by running `brew tap --repair`
Failed during: /usr/local/bin/brew update --force --quiet
以下のように躓いた部分を手動で入れてやり直すとエラーが出なくなった。
cd /usr/local/Homebrew/Library/Taps/dart-lang/
rm -rf homebrew-dart
git clone git@github.com:dart-lang/homebrew-dart.git