Less code in begin block
This commit is contained in:
parent
638363ac8b
commit
fd0ba6904f
@ -510,6 +510,7 @@ class Formula
|
|||||||
mkdir_p(logd)
|
mkdir_p(logd)
|
||||||
|
|
||||||
log = File.open(logfn, "w")
|
log = File.open(logfn, "w")
|
||||||
|
begin
|
||||||
log.puts Time.now, "", cmd, args, ""
|
log.puts Time.now, "", cmd, args, ""
|
||||||
log.flush
|
log.flush
|
||||||
|
|
||||||
@ -547,7 +548,8 @@ class Formula
|
|||||||
raise BuildError.new(self, cmd, args)
|
raise BuildError.new(self, cmd, args)
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
log.close if log && !log.closed?
|
log.close unless log.closed?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user