Monday, December 21, 2015

brew update seems to break brew cask update

First I did a brew update, subsequently, I tried to update brew-cask and it threw the below error:-

********
==> Homebrew Origin:
https://github.com/Homebrew/homebrew
==> Homebrew-cask Version:
0.57.0
test-mac:~ test$ brew-cask update
==> Error: Could not link caskroom/cask manpages to:
==>   /usr/local/share/man/man1/brew-cask.1
==> 
==> Please delete these files and run `brew tap --repair`.
*******

The "list" of software on brew-cask was broken

*******
test-mac:~ test$ brew-cask list
Error: Cask 'sublime-text' definition is invalid: Bad header line: parse failed
*******

Basically, brew cask doctor and cleanup did not help and had to be reinstalled:-

*******
test-mac:~ test$ brew unlink brew-cask
Unlinking /usr/local/Cellar/brew-cask/0.57.0... 2 symlinks removed
test-mac:~ test$ brew install brew-cask
==> Installing brew-cask from caskroom/cask
==> Cloning https://github.com/caskroom/homebrew-cask.git
Updating /Library/Caches/Homebrew/brew-cask--git
==> Checking out tag v0.60.0
==> Caveats
You can uninstall this formula as `brew tap Caskroom/cask` is now all that's
needed to install Homebrew Cask and keep it up to date.
==> Summary
🍺  /usr/local/Cellar/brew-cask/0.60.0: 3 files, 12K, built in 78 seconds
test-mac:~ test$ brew-cask list
-bash: /usr/local/bin/brew-cask: No such file or directory
test-mac:~ test$ brew cask list
sublime-text virtualbox
test-mac:~ test$ brew cask cleanup
==> Removing dead symlinks
Nothing to do
==> Removing cached downloads
Nothing to do
test-mac:~ test$ brew cask update
Already up-to-date.
test-mac:~ test$ brew update
Already up-to-date.
*******