aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-27 13:45:37 -0500
committerJack Nagel2014-03-27 13:45:37 -0500
commit0c99e648519091236a779c032f1702ae76747571 (patch)
tree369eaaa4e0582c03ab5e969e647b4ea9889bae24 /Library
parent38e26ed92989a3c8611d6d7bfa8fea76e86452fd (diff)
downloadbrew-0c99e648519091236a779c032f1702ae76747571.tar.bz2
Revert "Replace files atomically when relocating"
There are some weird interactions with ensure_writable and atomic_write that need to be sorted out. Fixes Homebrew/homebrew#27917. This reverts commit 41c21e6ea5647823a9e589a56f0494b622e26fb2.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg_fix_install_names.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb
index 2c444322b..d36eb2543 100644
--- a/Library/Homebrew/keg_fix_install_names.rb
+++ b/Library/Homebrew/keg_fix_install_names.rb
@@ -40,10 +40,13 @@ class Keg
(pkgconfig_files | libtool_files | script_files).each do |file|
file.ensure_writable do
- s = file.open("rb", &:read)
- s.gsub!(old_cellar, new_cellar)
- s.gsub!(old_prefix, new_prefix)
- file.atomic_write(s)
+ file.open('rb') do |f|
+ s = f.read
+ s.gsub!(old_cellar, new_cellar)
+ s.gsub!(old_prefix, new_prefix)
+ f.reopen(file, 'wb')
+ f.write(s)
+ end
end
end
end