On my personal and work machines, when running
brew update today I ran into this issue:
I had no idea what it meant, but it looked like a Ruby error, so I tried to dig into what this was all about.
I did a lot of
brew install the_silver_searcher) searching of the /usr/local directory, trying to find what “undent” was all about, and it appears to be some helper method added to the Ruby
String class, but it’s only used inside of automated tests for Homebrew, and not available as part of a cask definition. A bug?
For now, the fix was easy: remove
.undent from the java.rb cask definition on my machines.
- Find the java.rb cask file on your local machine
find /usr/local/Caskroom -name 'java.rb'
- Mine was here:
- Edit that file
- Find this line around line 95:
caveats <<-EOS.undentand change it to
- Save the file
brew updateor whatever
brewcommand you were trying to run.