avoid crash on EOF at end

This commit is contained in:
Joey Hess 2020-11-18 15:03:30 -04:00
parent e6d741af79
commit b021e2322f
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -270,7 +270,7 @@ hGetLineUntilExitOrEOF ph h = go []
Just _ -> finalcheck buf
finalcheck buf = do
ready <- hWaitForInput h 0
ready <- waitforinputorerror 0
if ready
then getloop buf finalcheck
-- No remaining buffered input, though the handle