Altered brew tap structure breaking brew-cask


Homebrew recently changed the way taps are identified. Or more specifically, after running an update:

Warning: Homebrew changed the structure of Taps like <someuser>/<sometap>.

For example, the first shows the location of brew cask on my MBA, the second on my Mac Pro. I’ll admit, I get a kick out of calling my Air a MBA; but I digress.


This causes issues when attempting to search for a cask. On my un–updated MBA:

$ brew cask search gnucash
==> Exact match

And on my updated Mac Pro:

% brew cask search gnucash
No cask found for "gnucash"

Last week, WyseNynga identified the issue on Github, with floriankubis suggesting creating a symlink to bridge the old/new folders. This comment thread has since been closed, with rolandwalker identifying that brew-cask needs to be upgraded in response to this change:

There’s a new code release — brew update && brew upgrade brew-cask should fix the problem.

For various reasons, the symlink trick only partially worked.

For reasons beyond me, upgrading as suggested didn’t work. In fact, it generated the same errors that would occur when brew-cask hadn’t even been installed:

$ brew cask search gnucash
Error: can't convert nil into String
Please report this bug:
/usr/local/Library/brew.rb:64:in `require'
/usr/local/Library/brew.rb:64:in `require?'

In this case, uninstalling and reinstalling seemed to do the trick:

$ brew uninstall brew-cask
$ brew install brew-cask
$ brew cask search gnucash
==> Exact match

Homebrew is a promising package manager for OS X, but its pre-1.0 version is demonstrated by such changes. It seems we have a ways to go before sysadmins can get the same (relatively) stable package system we have on our Linux boxes.

Image of the rather fabulous Godot throwing papers and coffee brew around by Takix on Pixiv.

Author bio and support


Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.