doctor: tweak tmp sticky bit check
This commit is contained in:
		
							parent
							
								
									ffbb1828a2
								
							
						
					
					
						commit
						c7b0173688
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user