From 75a824c7883e53c75dafa7bc5144ee44e51d3cd2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 18 Nov 2014 17:57:04 -0400 Subject: fix display of progress etc lines before protocol line --- src/Propellor/Protocol.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Propellor') diff --git a/src/Propellor/Protocol.hs b/src/Propellor/Protocol.hs index 99afb31f..198b3f32 100644 --- a/src/Propellor/Protocol.hs +++ b/src/Propellor/Protocol.hs @@ -1,7 +1,7 @@ -- | This is a simple line-based protocol used for communication between -- a local and remote propellor. It's sent over a ssh channel, and lines of -- the protocol can be interspersed with other, non-protocol lines --- that should be ignored. +-- that should be passed through to be displayed. module Propellor.Protocol where @@ -48,7 +48,9 @@ getMarked h marker = go =<< catchMaybeIO (hGetLine h) where go Nothing = return Nothing go (Just l) = case fromMarked marker l of - Nothing -> getMarked h marker + Nothing -> do + hPutStrLn stderr l + getMarked h marker Just v -> return (Just v) req :: Stage -> Marker -> (String -> IO ()) -> IO () -- cgit v1.2.3