mxcl/homebrew — pull request #14271 by jacknagel (2012-08-18 04:28:30+00:00)
Title: Simplify MacOS.locate

The first commit changes the semantics of MacOS.dev_tools_path slightly, by returning nil instead of an empty string if the path can't be determined. I think this makes more sense given it normally returns a Pathname, and it matches what we do with e.g. MacOS::Xcode.prefix.

Longer term the warning should probably be remove in favor of commands that need the dev tools doing something like `raise DevToolsNotFoundError if MacOS.dev_tools_path.nil?`.

The second commit greatly simplifies MacOS.locate. I don't want to break anything, but I _really_ want to make it more readable and maintainable.

Please review.

ping @samueljohn @mistydemeo