summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2018-02-19 15:39:52 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2018-02-19 15:39:52 -0400
commitbadc2b0ff025846e9b1f74033e156cdc59f8c383 (patch)
tree02e0f7c8835c9f8c5ea034426f7e29be5e6f20cc
parent5d866ad84a4fda2826eeed25d08526d7cde800b4 (diff)
fix build
-rw-r--r--Messages/Internal.hs4
-rw-r--r--Messages/JSON.hs3
2 files changed, 4 insertions, 3 deletions
diff --git a/Messages/Internal.hs b/Messages/Internal.hs
index 734b146b3..e5b32650e 100644
--- a/Messages/Internal.hs
+++ b/Messages/Internal.hs
@@ -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
diff --git a/Messages/JSON.hs b/Messages/JSON.hs
index 48e48ec73..897eb8cbf 100644
--- a/Messages/JSON.hs
+++ b/Messages/JSON.hs
@@ -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