Improve behavior when a git-annex command is told to operate on a file that doesn't exist. It will now continue to other files specified after that on the command line, and only error out at the end.
This commit is contained in:
parent
461b967966
commit
efb37e7c78
5 changed files with 20 additions and 11 deletions
15
Messages.hs
15
Messages.hs
|
@ -19,7 +19,7 @@ module Messages (
|
|||
showEndOk,
|
||||
showEndFail,
|
||||
showEndResult,
|
||||
showErr,
|
||||
toplevelWarning,
|
||||
warning,
|
||||
warningIO,
|
||||
indent,
|
||||
|
@ -117,15 +117,16 @@ showEndResult ok = handleMessage (JSON.end ok) $ putStrLn msg
|
|||
| ok = "ok"
|
||||
| otherwise = "failed"
|
||||
|
||||
showErr :: (Show a) => a -> Annex ()
|
||||
showErr e = warning' $ "git-annex: " ++ show e
|
||||
toplevelWarning :: Bool -> String -> Annex ()
|
||||
toplevelWarning makeway s = warning' makeway ("git-annex: " ++ s)
|
||||
|
||||
warning :: String -> Annex ()
|
||||
warning = warning' . indent
|
||||
warning = warning' True . indent
|
||||
|
||||
warning' :: String -> Annex ()
|
||||
warning' w = do
|
||||
handleMessage q $ putStr "\n"
|
||||
warning' :: Bool -> String -> Annex ()
|
||||
warning' makeway w = do
|
||||
when makeway $
|
||||
handleMessage q $ putStr "\n"
|
||||
liftIO $ do
|
||||
hFlush stdout
|
||||
hPutStrLn stderr w
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue