summaryrefslogtreecommitdiff
path: root/Messages.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Messages.hs')
-rw-r--r--Messages.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Messages.hs b/Messages.hs
index faa4dbcde..492251981 100644
--- a/Messages.hs
+++ b/Messages.hs
@@ -73,16 +73,17 @@ showEndResult b = handle (JSON.end b) $ putStrLn msg
| otherwise = "failed"
showErr :: (Show a) => a -> Annex ()
-showErr e = liftIO $ do
- hFlush stdout
- hPutStrLn stderr $ "git-annex: " ++ show e
+showErr e = warning' $ "git-annex: " ++ show e
warning :: String -> Annex ()
-warning w = do
+warning w = warning' (indent w)
+
+warning' :: String -> Annex ()
+warning' w = do
handle q $ putStr "\n"
liftIO $ do
hFlush stdout
- hPutStrLn stderr $ indent w
+ hPutStrLn stderr w
indent :: String -> String
indent s = join "\n" $ map (\l -> " " ++ l) $ lines s