avoid --batch crashing if a remote fails to be accessed

This commit is contained in:
Joey Hess 2016-02-12 16:48:03 -04:00
parent cc4d3e3d45
commit d3130930db
Failed to extract signature

View file

@ -68,8 +68,7 @@ exitResult (CheckFailure msg) = liftIO $ do
batchResult :: Result -> Annex ()
batchResult Present = liftIO $ putStrLn "1"
batchResult NotPresent = liftIO $ putStrLn "0"
batchResult failure = exitResult failure
batchResult _ = liftIO $ putStrLn "0"
toKey :: String -> Key
toKey = fromMaybe (error "Bad key") . file2key