Fix brew unlink
				
					
				
			Whoops.
This commit is contained in:
		
							parent
							
								
									69672ca965
								
							
						
					
					
						commit
						1e55c1f580
					
				@ -30,14 +30,16 @@ class Keg < Pathname
 | 
				
			|||||||
  def unlink
 | 
					  def unlink
 | 
				
			||||||
    n=0
 | 
					    n=0
 | 
				
			||||||
    %w[bin etc lib include sbin share var].map{ |d| self/d }.each do |src|
 | 
					    %w[bin etc lib include sbin share var].map{ |d| self/d }.each do |src|
 | 
				
			||||||
      next if src == self
 | 
					      src.find do |src|
 | 
				
			||||||
      dst=HOMEBREW_PREFIX+src.relative_path_from(self)
 | 
					        next if src == self
 | 
				
			||||||
      next unless dst.symlink?
 | 
					        dst=HOMEBREW_PREFIX+src.relative_path_from(self)
 | 
				
			||||||
      dst.uninstall_info if dst.to_s =~ INFOFILE_RX and ENV['HOMEBREW_KEEP_INFO']
 | 
					        next unless dst.symlink?
 | 
				
			||||||
      dst.unlink
 | 
					        dst.uninstall_info if dst.to_s =~ INFOFILE_RX and ENV['HOMEBREW_KEEP_INFO']
 | 
				
			||||||
      dst.parent.rmdir_if_possible
 | 
					        dst.unlink
 | 
				
			||||||
      n+=1
 | 
					        dst.parent.rmdir_if_possible
 | 
				
			||||||
      Find.prune if src.directory?
 | 
					        n+=1
 | 
				
			||||||
 | 
					        Find.prune if src.directory?
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
    linked_keg_record.unlink if linked_keg_record.exist?
 | 
					    linked_keg_record.unlink if linked_keg_record.exist?
 | 
				
			||||||
    n
 | 
					    n
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user