Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix `brew unlink`

Whoops.
  • Loading branch information...
commit fe76848a7dd3d1cdf5d4938e271bbf9ee3a74ddb 1 parent f372daf
Max Howell mxcl authored
Showing with 10 additions and 8 deletions.
  1. +10 −8 Library/Homebrew/keg.rb
18 Library/Homebrew/keg.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.