Commit 3db6d1b8 authored by Ian Lynagh's avatar Ian Lynagh

The default cleanup handler should /always/ delete the temp files

Not only if there has been an exception. It worked for GHC anyway,
as it was getting an ExitSuccess exception, but GHC API clients
shouldn't be required to do that.
parent 2d4e1203
......@@ -373,7 +373,7 @@ defaultCleanupHandler :: (ExceptionMonad m, MonadIO m) =>
DynFlags -> m a -> m a
defaultCleanupHandler dflags inner =
-- make sure we clean up after ourselves
inner `gonException`
inner `gfinally`
(liftIO $ do
cleanTempFiles dflags
cleanTempDirs dflags
......
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