aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/reinstall.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd/reinstall.rb')
-rw-r--r--Library/Homebrew/cmd/reinstall.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb
index c625d2d97..f5d6437bd 100644
--- a/Library/Homebrew/cmd/reinstall.rb
+++ b/Library/Homebrew/cmd/reinstall.rb
@@ -34,7 +34,7 @@ module Homebrew
fi = FormulaInstaller.new(f)
fi.options = options
fi.invalid_option_names = build_options.invalid_option_names
- fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && f.build.build_bottle?)
+ fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && f.build.bottle?)
fi.build_from_source = ARGV.build_from_source? || ARGV.build_all_from_source?
fi.force_bottle = ARGV.force_bottle?
fi.interactive = ARGV.interactive?
@@ -66,6 +66,8 @@ module Homebrew
return unless path.directory?
+ Pathname.new(keg).rmtree if keg.exist?
+
path.rename keg
keg.link unless formula.keg_only?
end