问题
Since my latest update of Homebrew (to 1.0.0), instead of just seeing
Checking out v1.0.1 in /usr/local/Homebrew...
when I brew update or brew upgrade --all I now see
Checking out v1.0.1 in /usr/local/Homebrew...
To checkout v1.0.1 in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout v1.0.1
Is that an error I should do something about? What's going on here? Are updates no failing for me?
回答1:
I had the same problem. Found the solution in this question, which is very similar to yours:
cd $(brew --prefix)/Homebrew && git fetch && git reset --hard origin/master
It seemed to be caused by a difference in "prefix" and "repository" directories for homebrew.
来源:https://stackoverflow.com/questions/39639146/why-am-i-told-to-cd-when-updating-homebrew