From ff134618f05d79dd2fb94e9df6533693f75542b2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 Feb 2018 15:55:00 -0400 Subject: [PATCH] split msg into lines msg is what would be output to stderr, so has some layout and formatting, which is perhaps not ideal, but let's at least avoid it containing line breaks. --- Messages/Internal.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Messages/Internal.hs b/Messages/Internal.hs index e5b32650ee..42ad14d516 100644 --- a/Messages/Internal.hs +++ b/Messages/Internal.hs @@ -62,7 +62,7 @@ outputJSON jsonbuilder s = case outputType s of outputError :: String -> Annex () outputError msg = withMessageState $ \s -> case (outputType s, jsonBuffer s) of (JSONOutput jsonoptions, Just jb) | jsonErrorMessages jsonoptions -> - let jb' = Just (JSON.addErrorMessage [msg] jb) + let jb' = Just (JSON.addErrorMessage (lines msg) jb) in Annex.changeState $ \st -> st { Annex.output = s { jsonBuffer = jb' } } _