diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-07-13 11:04:14 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-07-13 11:04:14 -0400 |
| commit | 632137836b39462883483a621f9dd696ce1d73cc (patch) | |
| tree | a3b875afa1d8609c5b4dcaad0dff459c7174d9f3 /src/Propellor/Protocol.hs | |
| parent | 3aae9ad46742d3de514380647811ae495cb83a83 (diff) | |
disable buffering earlier
The "fatal: Couldn't find remote ref HEAD" persists, and is intermittent
so hard to be sure but it seemed that disabling buffering earlier
avoided it. Now done first thing on start.
I was not able to find anything that reads from stdin other than
getMarked, but perhaps there is something..
Diffstat (limited to 'src/Propellor/Protocol.hs')
| -rw-r--r-- | src/Propellor/Protocol.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Propellor/Protocol.hs b/src/Propellor/Protocol.hs index ae7e0404..bc8d9327 100644 --- a/src/Propellor/Protocol.hs +++ b/src/Propellor/Protocol.hs @@ -53,11 +53,7 @@ sendMarked' h marker s = do hFlush h getMarked :: Handle -> Marker -> IO (Maybe String) -getMarked h marker = do - -- Avoid buffering anything in Handle, so that the data after - -- the marker will be available to be read from the underlying Fd. - hSetBuffering stdin NoBuffering - go =<< catchMaybeIO (hGetLine h) +getMarked h marker = go =<< catchMaybeIO (hGetLine h) where go Nothing = return Nothing go (Just l) = case fromMarked marker l of |
