Ensure we delete temp files
It's easy to code complete with Ruby, so lets. I love Ruby.
This commit is contained in:
parent
1ead7d380a
commit
700b20d665
@ -449,9 +449,12 @@ private
|
|||||||
# strip unlinks the file and recreates it, thus breaking hard links!
|
# strip unlinks the file and recreates it, thus breaking hard links!
|
||||||
# is this expected behaviour? patch does it too… still, this fixes it
|
# is this expected behaviour? patch does it too… still, this fixes it
|
||||||
tmp = `/usr/bin/mktemp -t homebrew_strip`.chomp
|
tmp = `/usr/bin/mktemp -t homebrew_strip`.chomp
|
||||||
`/usr/bin/strip #{args} -o #{tmp} #{path}`
|
begin
|
||||||
`/bin/cat #{tmp} > #{path}`
|
`/usr/bin/strip #{args} -o #{tmp} #{path}`
|
||||||
File.unlink tmp
|
`/bin/cat #{tmp} > #{path}`
|
||||||
|
ensure
|
||||||
|
FileUtils.rm tmp
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user