Fix bug in logging
This commit is contained in:
parent
27e2e7f848
commit
931080244f
@ -199,6 +199,7 @@ execLogged exe spath args lfile chdir env = do
|
|||||||
lineAction ref rs bs' = do
|
lineAction ref rs bs' = do
|
||||||
modifyIORef' ref (swapRegs bs')
|
modifyIORef' ref (swapRegs bs')
|
||||||
regs <- readIORef ref
|
regs <- readIORef ref
|
||||||
|
void $ SPIB.fdWrite fileFd (bs' <> "\n")
|
||||||
forM (zip regs rs) $ \(bs, r) -> do
|
forM (zip regs rs) $ \(bs, r) -> do
|
||||||
setConsoleRegion r $ do
|
setConsoleRegion r $ do
|
||||||
w <- consoleWidth
|
w <- consoleWidth
|
||||||
@ -210,8 +211,6 @@ execLogged exe spath args lfile chdir env = do
|
|||||||
. trim w
|
. trim w
|
||||||
. (\b -> "[ " <> toFilePath lfile <> " ] " <> b)
|
. (\b -> "[ " <> toFilePath lfile <> " ] " <> b)
|
||||||
$ bs
|
$ bs
|
||||||
SPIB.fdWrite fileFd (bs <> "\n")
|
|
||||||
|
|
||||||
|
|
||||||
swapRegs bs regs | length regs < size = regs ++ [bs]
|
swapRegs bs regs | length regs < size = regs ++ [bs]
|
||||||
| otherwise = tail regs ++ [bs]
|
| otherwise = tail regs ++ [bs]
|
||||||
|
Loading…
Reference in New Issue
Block a user