aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
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