aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-10-20 17:07:54 -0500
committerJack Nagel2014-10-20 17:07:54 -0500
commit044393641e5e5b72ebe117ddb9b3b5eb21f05479 (patch)
tree47140196cb207c025cd7164301fa7e951b52891f /Library
parent55e0f40d020062a03a56a50cc67c65c3dfea78c0 (diff)
downloadbrew-044393641e5e5b72ebe117ddb9b3b5eb21f05479.tar.bz2
Less code in begin block
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index 0cf6e122e..c657074c8 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -342,13 +342,17 @@ class Keg
end
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
keg.link_dir(src, mode) { :mkpath }
return true
end
- rescue NotAKegError
- puts "Won't resolve conflicts for symlink #{dst} as it doesn't resolve into the Cellar" if ARGV.verbose?
end
def make_relative_symlink dst, src, mode