Homebrew upgrade failure fix

Posted by Dan Sosedoff on January 19, 2012

If you have an old homebrew installation, upgrade method for package will fail with something like this:

Error: undefined method `include?' for nil:NilClass
Please report this bug:
    https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
/usr/local/Library/Homebrew/formula.rb:417:in `canonical_name'
/usr/local/Library/Homebrew/formula.rb:449:in `factory'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7:in `map'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/bin/brew:47:in `require'
/usr/local/bin/brew:47:in `require?'
/usr/local/bin/brew:80

This happens because of old brew-update command. Pretty annoying, so to fix it just run the following script:

cd `brew --prefix`/Library/Contributions/examples
git clean -n
git clean -f
Trackbacks

Trackbacks are closed.

Comments

Comments are closed.