Homebrew/homebrew — pull request #28944 by mikestok (2014-05-04 14:51:43+00:00)
Title: Improve error handling when a command is typo'd

At the moment when I mis-type a command at homebrew I see output like this:

$ brew upgraade
Error: can't convert nil into String
Please report this bug:
https://github.com/Homebrew/homebrew/wiki/troubleshooting
/usr/local/Library/brew.rb:64:in `require'
/usr/local/Library/brew.rb:64:in `require?'
/usr/local/Library/brew.rb:111

With this patch the output seems more helpful:

$ bin/brew upgraade
Error: Unknown command: upgraade