formula: reject dot dirs as racks
Dot directories are not racks because formulae names do not start with "." so avoid attempting to descend into dot directories, which may not always be possible (e.g. .Trashes).
This commit is contained in:
		
							parent
							
								
									d14fd49b30
								
							
						
					
					
						commit
						f818f0e681
					
				@ -1371,7 +1371,7 @@ class Formula
 | 
			
		||||
  def self.racks
 | 
			
		||||
    @racks ||= if HOMEBREW_CELLAR.directory?
 | 
			
		||||
      HOMEBREW_CELLAR.subdirs.reject do |rack|
 | 
			
		||||
        rack.symlink? || rack.subdirs.empty?
 | 
			
		||||
        rack.symlink? || rack.basename.to_s.start_with?(".") || rack.subdirs.empty?
 | 
			
		||||
      end
 | 
			
		||||
    else
 | 
			
		||||
      []
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user