aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2015-01-12 21:29:22 -0500
committerJack Nagel2015-01-12 21:29:22 -0500
commitd298e54e50fdea57456385a6e6eaad6f3fc193b8 (patch)
tree392df187af1cd1c010ca706aad33cdb6a1c9c48a /Library/Homebrew
parentd0a1800e374a164158ce6ef2d5f53fe6e8436903 (diff)
downloadbrew-d298e54e50fdea57456385a6e6eaad6f3fc193b8.tar.bz2
doctor: check access on HOMEBREW_PREFIX/opt
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/doctor.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 5c5f6701b..d6d26006a 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -478,6 +478,16 @@ def check_access_cellar
end
end
+def check_access_prefix_opt
+ opt = HOMEBREW_PREFIX.join("opt")
+ if opt.exist? && !opt.writable_real?
+ <<-EOS.undent
+ #{opt} isn't writable.
+ You should `chown` #{opt}
+ EOS
+ end
+end
+
def check_ruby_version
ruby_version = MacOS.version >= "10.9" ? "2.0" : "1.8"
if RUBY_VERSION[/\d\.\d/] != ruby_version then <<-EOS.undent