diff options
Diffstat (limited to 'Messages.hs')
-rw-r--r-- | Messages.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Messages.hs b/Messages.hs index d8be718cc..d82eb731b 100644 --- a/Messages.hs +++ b/Messages.hs @@ -19,6 +19,7 @@ module Messages ( showEndOk, showEndFail, showEndResult, + endResult, showErr, warning, warningIO, @@ -111,11 +112,11 @@ showEndFail :: Annex () showEndFail = showEndResult False showEndResult :: Bool -> Annex () -showEndResult ok = handleMessage (JSON.end ok) $ putStrLn msg - where - msg - | ok = "ok" - | otherwise = "failed" +showEndResult ok = handleMessage (JSON.end ok) $ putStrLn $ endResult ok + +endResult :: Bool -> String +endResult True = "ok" +endResult False = "failed" showErr :: (Show a) => a -> Annex () showErr e = warning' $ "git-annex: " ++ show e |