diff options
Diffstat (limited to 'Messages.hs')
-rw-r--r-- | Messages.hs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Messages.hs b/Messages.hs index 5dffbd8de..f6d26db9d 100644 --- a/Messages.hs +++ b/Messages.hs @@ -19,6 +19,7 @@ module Messages ( showEndOk, showEndFail, showEndResult, + endResult, toplevelWarning, 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" toplevelWarning :: Bool -> String -> Annex () toplevelWarning makeway s = warning' makeway ("git-annex: " ++ s) @@ -191,6 +192,6 @@ disableDebugOutput = updateGlobalLogger rootLoggerName $ setLevel NOTICE commandProgressDisabled :: Annex Bool commandProgressDisabled = withOutputType $ \t -> return $ case t of QuietOutput -> True - ProgressOutput -> True + ParallelOutput _ -> True JSONOutput -> True NormalOutput -> False |