diff --git a/Messages.hs b/Messages.hs index 563bd7e815..7fcee28067 100644 --- a/Messages.hs +++ b/Messages.hs @@ -124,14 +124,12 @@ showSideAction m = Annex.getState Annex.output >>= go where go st | sideActionBlock st == StartBlock = do - go' st + go' let st' = st { sideActionBlock = InBlock } Annex.changeState $ \s -> s { Annex.output = st' } | sideActionBlock st == InBlock = return () - | otherwise = go' st - go' st = do - liftIO $ clearProgressMeter st - outputMessage JSON.none $ encodeBS' $ "(" ++ m ++ "...)\n" + | otherwise = go' + go' = outputMessage JSON.none $ encodeBS' $ "(" ++ m ++ "...)\n" showStoringStateAction :: Annex () showStoringStateAction = showSideAction "recording state in git" diff --git a/Messages/Internal.hs b/Messages/Internal.hs index 138f7df2bd..30cbafc1b0 100644 --- a/Messages/Internal.hs +++ b/Messages/Internal.hs @@ -25,8 +25,12 @@ outputMessage = outputMessage' bufferJSON outputMessage' :: (JSONBuilder -> MessageState -> Annex Bool) -> JSONBuilder -> S.ByteString -> Annex () outputMessage' jsonoutputter jsonbuilder msg = withMessageState $ \s -> case outputType s of NormalOutput - | concurrentOutputEnabled s -> concurrentMessage s False (decodeBS msg) q - | otherwise -> liftIO $ flushed $ S.putStr msg + | concurrentOutputEnabled s -> do + liftIO $ clearProgressMeter s + concurrentMessage s False (decodeBS msg) q + | otherwise -> do + liftIO $ clearProgressMeter s + liftIO $ flushed $ S.putStr msg JSONOutput _ -> void $ jsonoutputter jsonbuilder s QuietOutput -> q SerializedOutput h _ -> do