From 9d8ab8183ff202474065f7aeec2caa774d3881d0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 Feb 2018 15:55:00 -0400 Subject: 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 e5b32650e..42ad14d51 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' } } _ -- cgit v1.2.3