less verbose failures seem better here
This commit is contained in:
parent
2ea589e117
commit
d23fc22f0e
2 changed files with 6 additions and 7 deletions
|
@ -109,7 +109,7 @@ addCmd file = inBackend file $ do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
stored <- Backend.storeFileKey file
|
stored <- Backend.storeFileKey file
|
||||||
case (stored) of
|
case (stored) of
|
||||||
Nothing -> showEndFail "no backend could store" file
|
Nothing -> showEndFail
|
||||||
Just (key, backend) -> do
|
Just (key, backend) -> do
|
||||||
logStatus key ValuePresent
|
logStatus key ValuePresent
|
||||||
setup g key
|
setup g key
|
||||||
|
@ -162,7 +162,7 @@ getCmd file = notinBackend file $ \(key, backend) -> do
|
||||||
logStatus key ValuePresent
|
logStatus key ValuePresent
|
||||||
showEndOk
|
showEndOk
|
||||||
else do
|
else do
|
||||||
showEndFail "get" file
|
showEndFail
|
||||||
|
|
||||||
{- Indicates a file's content is not wanted anymore, and should be removed
|
{- Indicates a file's content is not wanted anymore, and should be removed
|
||||||
- if it's safe to do so. -}
|
- if it's safe to do so. -}
|
||||||
|
@ -178,7 +178,7 @@ dropCmd file = notinBackend file $ \(key, backend) -> do
|
||||||
then do
|
then do
|
||||||
cleanup key
|
cleanup key
|
||||||
showEndOk
|
showEndOk
|
||||||
else showEndFail "drop" file
|
else showEndFail
|
||||||
where
|
where
|
||||||
cleanup key = do
|
cleanup key = do
|
||||||
logStatus key ValueMissing
|
logStatus key ValueMissing
|
||||||
|
|
7
Core.hs
7
Core.hs
|
@ -104,7 +104,6 @@ showLongNote s = do
|
||||||
showEndOk :: Annex ()
|
showEndOk :: Annex ()
|
||||||
showEndOk = do
|
showEndOk = do
|
||||||
liftIO $ putStrLn " ok"
|
liftIO $ putStrLn " ok"
|
||||||
showEndFail :: String -> String -> Annex ()
|
showEndFail :: Annex ()
|
||||||
showEndFail command file = do
|
showEndFail = do
|
||||||
liftIO $ putStrLn ""
|
liftIO $ putStrLn " failed"
|
||||||
liftIO $ hPutStrLn stderr $ command ++ " " ++ file ++ " failed"
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue