Fix file descriptor leak in Formula#system
This commit is contained in:
parent
77b5805fda
commit
a1f165c02d
@ -591,7 +591,7 @@ class Formula
|
|||||||
rescue ErrorDuringExecution
|
rescue ErrorDuringExecution
|
||||||
raise BuildError.new(self, cmd, args, $?)
|
raise BuildError.new(self, cmd, args, $?)
|
||||||
ensure
|
ensure
|
||||||
f.close if f and not f.closed?
|
[rd, f].each { |io| io.close if io and not io.closed? }
|
||||||
ENV.update(removed_ENV_variables) if removed_ENV_variables
|
ENV.update(removed_ENV_variables) if removed_ENV_variables
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user