From a10aa12f29def35c3a15c9d8dab598212ee60e80 Mon Sep 17 00:00:00 2001
From: risk <technoweenie@gmail.com>
Date: Fri, 22 Jul 2011 10:41:49 -0700
Subject: [PATCH] check for a valid $TMPDIR path in brew doctor

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
---
 Library/Homebrew/cmd/doctor.rb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 5a4b490b43..90b94d5d61 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -725,6 +725,14 @@ def check_for_other_frameworks
   end
 end
 
+def check_tmpdir
+  tmpdir = ENV['TMPDIR']
+  if !File.directory?(tmpdir)
+    puts "$TMPDIR #{tmpdir.inspect} doesn't exist."
+    puts
+  end
+end
+
 module Homebrew extend self
   def doctor
     old_stdout = $stdout
@@ -765,6 +773,7 @@ module Homebrew extend self
       check_for_autoconf
       check_for_linked_kegonly_brews
       check_for_other_frameworks
+      check_tmpdir
     ensure
       $stdout = old_stdout
     end
-- 
GitLab