aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorrisk2011-07-22 10:41:49 -0700
committerAdam Vandenberg2011-07-28 19:50:39 -0700
commit358f78a10a1090c19477ff1474310c240645b89d (patch)
tree30576b472403fc4cc4bec4eda6f855f2c98a1194 /Library
parent29e2a3f7b01abbca9878db211cac4be192e48d1e (diff)
downloadhomebrew-358f78a10a1090c19477ff1474310c240645b89d.tar.bz2
check for a valid $TMPDIR path in brew doctor
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 5a4b490b4..90b94d5d6 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