Keg#unlink: skip find for non-extant files
In 1.8, Pathname.find would work (and do nothing) if the source path didn't exist. In 1.9 this throws an exception instead, so check whether the file exists before trying.
This commit is contained in:
parent
54618074a1
commit
44ccd122c2
@ -30,6 +30,7 @@ class Keg < Pathname
|
||||
def unlink
|
||||
n=0
|
||||
%w[bin etc lib include sbin share var].map{ |d| self/d }.each do |src|
|
||||
next unless src.exist?
|
||||
src.find do |src|
|
||||
next if src == self
|
||||
dst=HOMEBREW_PREFIX+src.relative_path_from(self)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user