From 71f9d74adf93dc8294c345f13036a1bb817ba06a Mon Sep 17 00:00:00 2001
From: Adam Vandenberg <flangy@gmail.com>
Date: Wed, 31 Mar 2010 14:59:50 -0700
Subject: [PATCH] Move X11 check.

---
 Library/Homebrew/brew_doctor.rb | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Library/Homebrew/brew_doctor.rb b/Library/Homebrew/brew_doctor.rb
index 8a0b50a7cb..edba244eb8 100644
--- a/Library/Homebrew/brew_doctor.rb
+++ b/Library/Homebrew/brew_doctor.rb
@@ -9,6 +9,13 @@ def check_for_stray_dylibs
   end
 end
 
+def check_for_x11
+  unless File.exists? '/usr/X11/lib/libpng.dylib'
+    puts "You don't have X11 installed as part of your Xcode installation."
+    puts "This isn't required for all formula. But it is expected by some."
+  end
+end
+
 def brew_doctor
   read, write = IO.pipe
 
@@ -33,10 +40,7 @@ def brew_doctor
       puts
     end
 
-    unless File.exists? '/usr/X11/lib/libpng.dylib'
-      puts "You don't have X11 installed as part of your Xcode installation."
-      puts "This isn't required for all formula. But it is expected by some."
-    end
+    check_for_x11
 
     exit! 0
   else
-- 
GitLab