Less code in begin block
This commit is contained in:
parent
55e0f40d02
commit
044393641e
@ -342,13 +342,17 @@ class Keg
|
|||||||
end
|
end
|
||||||
|
|
||||||
if stat.directory?
|
if stat.directory?
|
||||||
keg = Keg.for(src)
|
begin
|
||||||
|
keg = Keg.for(src)
|
||||||
|
rescue NotAKegError
|
||||||
|
puts "Won't resolve conflicts for symlink #{dst} as it doesn't resolve into the Cellar" if ARGV.verbose?
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
dst.unlink unless mode.dry_run
|
dst.unlink unless mode.dry_run
|
||||||
keg.link_dir(src, mode) { :mkpath }
|
keg.link_dir(src, mode) { :mkpath }
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
rescue NotAKegError
|
|
||||||
puts "Won't resolve conflicts for symlink #{dst} as it doesn't resolve into the Cellar" if ARGV.verbose?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def make_relative_symlink dst, src, mode
|
def make_relative_symlink dst, src, mode
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user