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.
This commit is contained in:
parent
572754c925
commit
ff134618f0
1 changed files with 1 additions and 1 deletions
|
@ -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' } }
|
||||
_
|
||||
|
|
Loading…
Reference in a new issue