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