mxcl/homebrew — pull request #23046 by nevyn (2013-10-04 14:36:17+00:00)
Title: Fail if current SDK is missing

I couldn't install cairo on 10.9, and I got a very unhelpful error message. I've no idea
if this is the correct solution, but it seems like code calling sdk_path expects it
to return a value, so if we can't, it makes sense to fail with a good error message.

This is the error Cairo gave me:

==> Installing cairo
Error: undefined method `/' for nil:NilClass
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/extend/ENV/std.rb:290:in `x11'
/usr/local/Library/Homebrew/requirements/x11_dependency.rb:10
/usr/local/Library/Homebrew/build_environment.rb:26:in `instance_eval'
...
/usr/local/Library/Homebrew/build_environment.rb:26:in `modify_build_environment'
/usr/local/Library/Homebrew/requirement.rb:50:in `modify_build_environment'

and it's because I have the iOS 7 Xcode GM, which doesn't include the 10.9 SDK (or it
might do with the 10.9 GM, but I don't have it yet, but I expect this error to happen
in the future, so let's help users fix it).