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!
|
||||
# is this expected behaviour? patch does it too… still, this fixes it
|
||||
tmp = `/usr/bin/mktemp -t homebrew_strip`.chomp
|
||||
begin
|
||||
`/usr/bin/strip #{args} -o #{tmp} #{path}`
|
||||
`/bin/cat #{tmp} > #{path}`
|
||||
File.unlink tmp
|
||||
ensure
|
||||
FileUtils.rm tmp
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user