From 340769443c5d2644afdb3af817ea23c0176c89d8 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 25 Nov 2012 15:04:58 -0600 Subject: [PATCH] Rewrite plists when installing from a bottle --- Library/Homebrew/extend/pathname.rb | 2 +- Library/Homebrew/formula_installer.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 2b04cae570..d39b21689e 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -98,7 +98,7 @@ class Pathname # we assume this pathname object is a file obviously def write content - #raise "Will not overwrite #{to_s}" if exist? and not ARGV.force? + raise "Will not overwrite #{to_s}" if exist? and not ARGV.force? dirname.mkpath File.open(self, 'w') {|f| f.write content } end diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index ee4ab52d40..06c12ced60 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -288,9 +288,9 @@ class FormulaInstaller end def install_plist - # Install a plist if one is defined - # Skip plist file exists check: https://github.com/mxcl/homebrew/issues/15849 if f.startup_plist + # A plist may already exist if we are installing from a bottle + f.plist_path.unlink if f.plist_path.exist? f.plist_path.write f.startup_plist f.plist_path.chmod 0644 end