Commit eadde7a2 authored by ttuegel's avatar ttuegel
Browse files

Fixed crash on Windows due to file handle leak.

Ticket #843. Cabal test crashed when trying to delete a temporary log file
because 'readFile' reads unnecessarily lazily and was keeping a file handle
open during attempted deletion. This patch forces the entire file to be read
so the handle will be closed.
parent 6adf1b12
......@@ -210,7 +210,7 @@ testController flags pkg_descr lbi suite preTest cmd postTest logNamer = do
-- Generate TestSuiteLog from executable exit code and a machine-
-- readable test log
suiteLog <- readFile tempInput >>= return . postTest exit
suiteLog <- fmap (postTest exit $!) $ readFile tempInput
-- Generate final log file name
let finalLogName = testLogDir </> logNamer suiteLog
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment