fix stderr handling

This commit is contained in:
Joey Hess 2015-04-03 19:48:56 -04:00
parent 20fb91a7ad
commit 45e97191c3
2 changed files with 3 additions and 2 deletions

View file

@ -61,8 +61,8 @@ mkProgressHandler meter = ProgressHandler
quietmode = withOutputType $ \t -> return $ case t of
ProgressOutput -> True
_ -> False
stderrhandler emitter h = do
void $ emitter =<< hGetLine stderr
stderrhandler emitter h = unlessM (hIsEOF h) $ do
void $ emitter =<< hGetLine h
stderrhandler emitter h
{- Generates an IO action that can be used to emit stderr.