fix build
This commit is contained in:
parent
84a74b80ee
commit
0292af8520
2 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
{- git-annex output messages, including concurrent output to display regions
|
||||
-
|
||||
- Copyright 2010-2016 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2010-2018 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- Licensed under the GNU GPL version 3 or higher.
|
||||
-}
|
||||
|
@ -64,7 +64,7 @@ outputError msg = withMessageState $ \s -> case (outputType s, jsonBuffer s) of
|
|||
(JSONOutput jsonoptions, Just jb) | jsonErrorMessages jsonoptions ->
|
||||
let jb' = Just (JSON.addErrorMessage [msg] jb)
|
||||
in Annex.changeState $ \st ->
|
||||
st { Annex.output = s { jsonBuffer = jb' }
|
||||
st { Annex.output = s { jsonBuffer = jb' } }
|
||||
_
|
||||
| concurrentOutputEnabled s -> concurrentMessage s True msg go
|
||||
| otherwise -> go
|
||||
|
|
|
@ -87,10 +87,11 @@ finalize jsonoptions o
|
|||
|
||||
addErrorMessage :: [String] -> Object -> Object
|
||||
addErrorMessage msg o =
|
||||
HM.insertWith combinearray "error-messages" (Array $ V.fromList msg ) o
|
||||
HM.insertWith combinearray "error-messages" v o
|
||||
where
|
||||
combinearray (Array new) (Array old) = Array (old <> new)
|
||||
combinearray new _old = new
|
||||
v = Array $ V.fromList $ map (String . T.pack) msg
|
||||
|
||||
note :: String -> JSONBuilder
|
||||
note _ Nothing = Nothing
|
||||
|
|
Loading…
Reference in a new issue