aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
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