Don't reinvent IndexError here

This commit is contained in:
Jack Nagel 2013-02-10 20:59:44 -06:00
parent 7b8f4b3d19
commit c16ee6f300

View File

@ -206,23 +206,18 @@ module MacOS extend self
} }
def compilers_standard? def compilers_standard?
xcode = Xcode.version STANDARD_COMPILERS.fetch(Xcode.version.to_s).all? do |method, build|
MacOS.send(:"#{method}_version") == build
unless STANDARD_COMPILERS.keys.include? xcode end
rescue IndexError
onoe <<-EOS.undent onoe <<-EOS.undent
Homebrew doesn't know what compiler versions ship with your version of Homebrew doesn't know what compiler versions ship with your version
Xcode. Please `brew update` and if that doesn't help, file an issue with of Xcode (#{Xcode.version}). Please `brew update` and if that doesn't help, file
the output of `brew --config`: an issue with the output of `brew --config`:
https://github.com/mxcl/homebrew/issues https://github.com/mxcl/homebrew/issues
Thanks! Thanks!
EOS EOS
return
end
STANDARD_COMPILERS[xcode].all? do |method, build|
MacOS.send(:"#{method}_version") == build
end
end end
def app_with_bundle_id id def app_with_bundle_id id