aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/keg.rb
diff options
context:
space:
mode:
authorJack Nagel2014-03-31 21:33:37 -0500
committerJack Nagel2014-03-31 21:33:37 -0500
commitcdfa29a695864fec7794e557b6abf346a35b2b4c (patch)
tree8d3990f5a33f979701e613cec3b48583203d3285 /Library/Homebrew/keg.rb
parentda92a428672612e876dad3ce662c30467b5d3241 (diff)
downloadhomebrew-cdfa29a695864fec7794e557b6abf346a35b2b4c.tar.bz2
Pass the link mode to resolve_any_conflicts
Diffstat (limited to 'Library/Homebrew/keg.rb')
-rw-r--r--Library/Homebrew/keg.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index edf82a71d..ab8a45300 100644
--- a/Library/Homebrew/keg.rb
+++ b/Library/Homebrew/keg.rb
@@ -213,15 +213,15 @@ class Keg < Pathname
protected
- def resolve_any_conflicts dst
+ def resolve_any_conflicts dst, mode
# if it isn't a directory then a severe conflict is about to happen. Let
# it, and the exception that is generated will message to the user about
# the situation
if dst.symlink? and dst.directory?
src = (dst.parent+dst.readlink).cleanpath
keg = Keg.for(src)
- dst.unlink
- keg.link_dir(src) { :mkpath }
+ dst.unlink unless mode.dry_run
+ keg.link_dir(src, mode) { :mkpath }
return true
end
rescue NotAKegError
@@ -301,9 +301,9 @@ class Keg < Pathname
when :skip_dir
Find.prune
when :mkpath
- dst.mkpath unless resolve_any_conflicts(dst)
+ dst.mkpath unless resolve_any_conflicts(dst, mode)
else
- unless resolve_any_conflicts(dst)
+ unless resolve_any_conflicts(dst, mode)
make_relative_symlink dst, src, mode
Find.prune
end