mxcl/homebrew — pull request #10720 by vhata (2012-03-06 15:28:56+00:00)
Title: 'brew doctor' provides bad example command

Running "brew doctor" in some circumstances provides a badly formatted, non-copy-pastable example command:

Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:

brew install autoconf libyaml autoconf, libyaml

Run `brew missing` for more details.

I created three test recipes, one which depends on *autoconf*, one on *libyaml*, and one on both *autoconf* and *libyaml*. I then installed them and removed *libyaml* and *autoconf* with the following result:

$ brew missing
test-one: autoconf
test-three: autoconf, libyaml
test-two: libyaml

Since 'brew doctor' simply checks whether the stuff on the right hand side of the colon is in its list of missing dependencies, it does not find "autoconf, libyaml" in the list, and adds it as a dependency.

This pull request fixes the output so it can be copy-pasted:

Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:

brew install autoconf libyaml

Run `brew missing` for more details.