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
commit4e741679e461ee1ca9f915fee929358f5df1275b (patch)
tree0cabaa8ea0135d381256c9e0b4f170605d876b1f /Library
parent781d1273bba05cbd5880fed65f2b774d9b2d623c (diff)
downloadhomebrew-4e741679e461ee1ca9f915fee929358f5df1275b.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 #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