summaryrefslogtreecommitdiff
path: root/src/Utility
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utility')
-rw-r--r--src/Utility/ConcurrentOutput.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Utility/ConcurrentOutput.hs b/src/Utility/ConcurrentOutput.hs
index 0f1cf9d3..5bf973de 100644
--- a/src/Utility/ConcurrentOutput.hs
+++ b/src/Utility/ConcurrentOutput.hs
@@ -248,7 +248,7 @@ outputDrainer ss fromh toh buf
go
_ -> atend
atend = do
- modifyMVar_ buf $ pure . (++ [(toh, ReachedEnd)])
+ modifyMVar_ buf $ pure . ((toh, ReachedEnd) :)
hClose fromh
-- Wait to lock output, and once we can, display everything
@@ -260,7 +260,7 @@ bufferWriter buf = lockOutput (go [stdout, stderr])
go [] = return ()
go hs = do
l <- takeMVar buf
- forM_ l $ \(h, ba) -> case ba of
+ forM_ (reverse l) $ \(h, ba) -> case ba of
Output b -> do
B.hPut h b
hFlush h