aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorTim D. Smith2014-11-10 19:16:49 -0800
committerTim D. Smith2014-11-14 16:05:18 -0800
commit2cc2da2e2c3e6d18ba46d4a3c2534cf1c0090fe3 (patch)
treea7ebfad73821ac741fc29164d4bba9305f09453e /Library/Homebrew/cmd
parent037c1b213694c4d632b6dc6e244575003516c950 (diff)
downloadhomebrew-2cc2da2e2c3e6d18ba46d4a3c2534cf1c0090fe3.tar.bz2
doctor: check that Python site-packages directory is writable
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 8cb729dd1..35259532f 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -434,6 +434,19 @@ end
end
end
+def check_access_site_packages
+ if Language::Python.homebrew_site_packages.exist? && !Language::Python.homebrew_site_packages.writable_real?
+ <<-EOS.undent
+ #{Language::Python.homebrew_site_packages} isn't writable.
+ This can happen if you "sudo pip install" software that isn't managed
+ by Homebrew. If you install a formula with Python modules, the install
+ will fail during the link step.
+
+ You should probably `chown` #{Language::Python.homebrew_site_packages}
+ EOS
+ end
+end
+
def check_access_logs
if HOMEBREW_LOGS.exist? and not HOMEBREW_LOGS.writable_real?
<<-EOS.undent