fix stderr handling
This commit is contained in:
parent
20fb91a7ad
commit
45e97191c3
2 changed files with 3 additions and 2 deletions
|
@ -61,8 +61,8 @@ mkProgressHandler meter = ProgressHandler
|
||||||
quietmode = withOutputType $ \t -> return $ case t of
|
quietmode = withOutputType $ \t -> return $ case t of
|
||||||
ProgressOutput -> True
|
ProgressOutput -> True
|
||||||
_ -> False
|
_ -> False
|
||||||
stderrhandler emitter h = do
|
stderrhandler emitter h = unlessM (hIsEOF h) $ do
|
||||||
void $ emitter =<< hGetLine stderr
|
void $ emitter =<< hGetLine h
|
||||||
stderrhandler emitter h
|
stderrhandler emitter h
|
||||||
|
|
||||||
{- Generates an IO action that can be used to emit stderr.
|
{- Generates an IO action that can be used to emit stderr.
|
||||||
|
|
|
@ -321,6 +321,7 @@ stderrHandle _ = error "expected stderrHandle"
|
||||||
ioHandles :: (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> (Handle, Handle)
|
ioHandles :: (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> (Handle, Handle)
|
||||||
ioHandles (Just hin, Just hout, _, _) = (hin, hout)
|
ioHandles (Just hin, Just hout, _, _) = (hin, hout)
|
||||||
ioHandles _ = error "expected ioHandles"
|
ioHandles _ = error "expected ioHandles"
|
||||||
|
oeHandles :: (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> (Handle, Handle)
|
||||||
oeHandles (_, Just hout, Just herr, _) = (hout, herr)
|
oeHandles (_, Just hout, Just herr, _) = (hout, herr)
|
||||||
oeHandles _ = error "expected oeHandles"
|
oeHandles _ = error "expected oeHandles"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue