summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2018-02-19 15:55:00 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2018-02-19 15:55:00 -0400
commit9d8ab8183ff202474065f7aeec2caa774d3881d0 (patch)
tree3acade708df99b5d5457d3c8873775e020798538
parentaebef502e2103b3c2ff0d74038b5b5c6c58d2bc7 (diff)
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.
-rw-r--r--Messages/Internal.hs2
1 files changed, 1 insertions, 1 deletions
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' } }
_