Permalink
Browse files

Skip standard compilers check for unknown Xcode

Rescuing false on the StandardCompilers map meant that the doctor
check assumed that the compilers were incorrect, not merely
unknown.

Instead, skip the check and return nil for unknown Xcode; nil
should be interpreted as "dunno", instead of "true" or "false",
and the doctor check no longer prints on nil.
  • Loading branch information...
1 parent 7e33039 commit 4b260413c2a7d174c86046056c01cfca3fd60b1c @mistydemeo mistydemeo committed with Dennis Luxen Sep 14, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 Library/Homebrew/cmd/doctor.rb
  2. +2 −1 Library/Homebrew/macos.rb
@@ -259,7 +259,8 @@ def check_cc
def check_standard_compilers
return if check_for_latest_xcode # only check if Xcode is up to date
- if !MacOS.compilers_standard? then <<-EOS.undent
+ compiler_status = MacOS.compilers_standard?
+ if not compiler_status and not compiler_status.nil? then <<-EOS.undent
Your compilers are different from the standard versions for your Xcode.
If you have Xcode 4.3 or newer, you should install the Command Line Tools for
Xcode from within Xcode's Download preferences.
@@ -204,9 +204,10 @@ def compilers_standard?
Thanks!
EOS
+ return
end
- StandardCompilers[xcode].all? { |method, build| MacOS.send(method) == build } rescue false
+ StandardCompilers[xcode].all? { |method, build| MacOS.send(method) == build }
end
def app_with_bundle_id id

0 comments on commit 4b26041

Please sign in to comment.