After upgrading to Homebrew 1.0.0 there were a few linking issues i've solved via brew doctor. But the one remaining issue is the following output when i run brew update
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
Already up-to-date.
Why is it basically necessary to manually update Homebrew via git checkout? Went there something wrong beforehand in my setup? Best regards r.
that command doesn't even work for me. I get the same error even after running that command.
edit: it was originally telling me to run cd /usr/local/Homebrew && git checkout master, then I ran brew upgrade, and it now tells me to run cd /usr/local/Homebrew && git checkout v1.0.1
I haven't got time to look into this issue but I guess it's just stupid warning that shouldn't be printed.
If you run
$ cd /usr/local/Homebrew && git describe --tags
and see 1.0.1 then all is well.
edit: it was originally telling me to run cd /usr/local/Homebrew && git checkout master, then I ran brew upgrade, and it now tells me to run cd /usr/local/Homebrew && git checkout v1.0.1
It tells you to checkout master because you were originally on the master branch and were switched to v1.0.1 by the update. You should stay that way, and the message should have been "if you _really_ want to switch back to master (probably not) you should blah blah".
As for telling you how to switch to v1.0.1 when you're already on v1.0.1: that's just a flaw in the logic introduced in #1060 that led to the message being printed when it shouldn't. It doesn't mean any actual problem with your installation.
@zmwangx thanks for getting back that fast! well i did a git describe --tagsand it shows 1.0.1. So all should be fine and i can ignore the warning. Cool :) thanks!
Will Homebrew automatically check out a branch with the current version going forward?
And, will this message be suppressed at some point in the future? It's confusing enough as it is, especially if you're not 100% fluent with how Homebrew and/or Git works.
This is a crappy and confusing message, I agree. We will fix it in future so it's not confusing. The only problem is the messaging (and incorrect version number, I forgot to bump it to 1.0.1) and not the actual way the command behaves.
Released, run brew update (twice).
@MikeMcQuaid That doesn't appear sufficient:
~ $ brew update
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
Already up-to-date.
~ $ brew update
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
Already up-to-date.
~ $ brew update
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
Already up-to-date.
~ $ brew upgrade
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
~ $ brew upgrade
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
~ $ brew upgrade
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
It correctly suppressed the message for me.
Running brew update twice didn't work for me either. Inspired by this post, I tried cd "$(brew --repo)"; git fetch, then did brew update. That worked for me.
I see someone else is saying this will work: brew update --force; brew update.
Message suppressed for me too, but brew --version reports Homebrew >1.0.0 (no git repository), is this normal?
@miccal: I get the same output for brew --version, and so does someone else I asked to run the command. Except: if I do
cd "$(brew --repo)"
brew --version
…then I get this:
Homebrew 1.0.2
Homebrew/homebrew-core (git revision 2775; last commit 2016-09-22)
I suspect brew --version just outputs the value of HOMEBREW_VERSION, defined here:
HOMEBREW_VERSION="$(git describe --tags --dirty 2>/dev/null)"
if [[ -z "$HOMEBREW_VERSION" ]]
then
HOMEBREW_VERSION=">1.0.0 (no git repository)"
fi
The value seems to be sensitive to which directory you're in when you execute the brew command. My guess is that this is a bug.
@rhanneken see #1090 (already being fixed 馃槈)
Thanks @rhanneken and @tsparber.
Most helpful comment
I haven't got time to look into this issue but I guess it's just stupid warning that shouldn't be printed.
If you run
and see
1.0.1then all is well.