error: Not a valid ref: refs/remotes/origin/master Warning: No available formula with the name "opencv". ==> Searching for similarly named formulae...
(base) SUNNY-MacBook-Air:~ dns$ rm -fr $(brew --repo homebrew/core) # because you can't `brew untap homebrew/core`
brew tap homebrew/core
(base) SUNNY-MacBook-Air:~ dns$ brew tap homebrew/core