I don't use casks much, but on my test machine I just tapped the cask infrastructure to see what it installs today. I have the
brew-cask.rb file and not the one in
If you have a backup system, back up and then delete
/usr/local/bin/brew-cask and rerun
brew doctor. You could also rename the file if you don't want to hassle with backups.
mv /usr/local/bin/brew-cask /usr/local/bin/ZZdeleteZZbrew-cask
That way a program or script calling the tool won't see the file (or sym link) in /usr/local/bin. You could then test things a bit and clean up the file in question. It also is easier to fix if my hunch that the one in
bin is needed somewhere and the tool is wrong to complain about both.
Additionally, there looks like a change was made somewhat recently to cask/brew integration:
My uninstall steps were different than the ones linked above since I installed cask today and not from before. My results might not match yours in that case :(