Skip to content

Commit

Permalink
Fix brew unlink
Browse files Browse the repository at this point in the history
Whoops.
  • Loading branch information
mxcl committed Mar 25, 2012
1 parent f372daf commit fe76848
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Library/Homebrew/keg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,16 @@ def uninstall
def unlink
n=0
%w[bin etc lib include sbin share var].map{ |d| self/d }.each do |src|
next if src == self
dst=HOMEBREW_PREFIX+src.relative_path_from(self)
next unless dst.symlink?
dst.uninstall_info if dst.to_s =~ INFOFILE_RX and ENV['HOMEBREW_KEEP_INFO']
dst.unlink
dst.parent.rmdir_if_possible
n+=1
Find.prune if src.directory?
src.find do |src|
next if src == self
dst=HOMEBREW_PREFIX+src.relative_path_from(self)
next unless dst.symlink?
dst.uninstall_info if dst.to_s =~ INFOFILE_RX and ENV['HOMEBREW_KEEP_INFO']
dst.unlink
dst.parent.rmdir_if_possible
n+=1
Find.prune if src.directory?
end
end
linked_keg_record.unlink if linked_keg_record.exist?
n
Expand Down

0 comments on commit fe76848

Please sign in to comment.