aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-25 23:45:23 -0500
committerJack Nagel2014-03-25 23:45:23 -0500
commit64652563773d255cc9c9a2e14e3e4e7ba25c22c8 (patch)
tree073133fca8a4d11df04d77aee66188cbace1caed /Library
parentfddd9ae1ae77629edddccd88a756097e69f1f1d9 (diff)
downloadhomebrew-64652563773d255cc9c9a2e14e3e4e7ba25c22c8.tar.bz2
Write plists atomically
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index e2be278b0..9e8cab3fb 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -551,9 +551,7 @@ class FormulaInstaller
def install_plist
return unless f.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.plist
+ f.plist_path.atomic_write(f.plist)
f.plist_path.chmod 0644
end