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.
This commit is contained in:
parent
38e26ed929
commit
0c99e64851
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user