aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-05-01 09:02:18 -0700
committerAdam Vandenberg2010-05-01 09:02:18 -0700
commit5ea2248085d74b289fd18c07501426af8b7582f7 (patch)
treea12fa0affb55fc9cb0c952bad03d2fa6c649f10b /Library
parent59941733c4009ec34add2ed228ac84b2283e3cf3 (diff)
downloadbrew-5ea2248085d74b289fd18c07501426af8b7582f7.tar.bz2
Update gcc version checks in brew_doctor
brew_doctor's gcc version checks wasn't taking into account the case where the user doesn't have one or both of GCC 4.0.x and 4.2.x installed.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew_doctor.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb
index 37ab588f7..94fbf1e0d 100644
--- a/Library/Homebrew/brew_doctor.rb
+++ b/Library/Homebrew/brew_doctor.rb
@@ -36,7 +36,12 @@ def check_gcc_versions
gcc_42 = gcc_42_build
gcc_40 = gcc_40_build
- if gcc_42 < RECOMMENDED_GCC_42
+ if gcc_42 == nil
+ puts <<-EOS.undent
+ We couldn't detect gcc 4.2.x. Some formulas require this compiler.
+
+ EOS
+ elsif gcc_42 < RECOMMENDED_GCC_42
puts <<-EOS.undent
Your gcc 4.2.x version is older than the recommended version. It may be advisable
to upgrade to the latest release of Xcode.
@@ -44,7 +49,12 @@ def check_gcc_versions
EOS
end
- if gcc_40 < RECOMMENDED_GCC_40
+ if gcc_40 == nil
+ puts <<-EOS.undent
+ We couldn't detect gcc 4.0.x. Some formulas require this compiler.
+
+ EOS
+ elsif gcc_40 < RECOMMENDED_GCC_40
puts <<-EOS.undent
Your gcc 4.0.x version is older than the recommended version. It may be advisable
to upgrade to the latest release of Xcode.