aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2015-11-04 12:52:47 +0000
committerDominyk Tiller2015-11-04 12:53:31 +0000
commitc7b0173688c7ef3684874c220a24b654b9ee36d6 (patch)
treefc5a7e8e24fff87ea30f4fa19eb22814dec3702e /Library
parentffbb1828a2f7dea872fe6fcf488ebdfd6b58d901 (diff)
downloadbrew-c7b0173688c7ef3684874c220a24b654b9ee36d6.tar.bz2
doctor: tweak tmp sticky bit check
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index eecec5788..1bf69b00f 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -454,10 +454,18 @@ class Checks
end
def check_tmpdir_sticky_bit
+ # Repair Disk Permissions was removed(?) in El Capitan.
+ # https://support.apple.com/en-us/HT201560
+ if MacOS.version < "10.11"
+ fix_message = "Please run \"Repair Disk Permissions\" in Disk Utility."
+ else
+ fix_message = "Please execute `sudo chmod +t #{HOMEBREW_TEMP}` in your Terminal"
+ end
+
world_writable = HOMEBREW_TEMP.stat.mode & 0777 == 0777
if world_writable && !HOMEBREW_TEMP.sticky? then <<-EOS.undent
#{HOMEBREW_TEMP} is world-writable but does not have the sticky bit set.
- Please run "Repair Disk Permissions" in Disk Utility.
+ #{fix_message}
EOS
end
end