summaryrefslogtreecommitdiff
path: root/Command/CheckPresentKey.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/CheckPresentKey.hs')
-rw-r--r--Command/CheckPresentKey.hs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Command/CheckPresentKey.hs b/Command/CheckPresentKey.hs
index 4f9b4b120..6d172b68e 100644
--- a/Command/CheckPresentKey.hs
+++ b/Command/CheckPresentKey.hs
@@ -52,12 +52,10 @@ check ks mr = case mr of
k = toKey ks
go Nothing [] = return NotPresent
go (Just e) [] = return $ CheckFailure e
- go olderr (r:rs) = do
- v <- Remote.hasKey r k
- case v of
- Right True -> return Present
- Right False -> go olderr rs
- Left e -> go (Just e) rs
+ go olderr (r:rs) = Remote.hasKey r k >>= \case
+ Right True -> return Present
+ Right False -> go olderr rs
+ Left e -> go (Just e) rs
exitResult :: Result -> Annex a
exitResult Present = liftIO exitSuccess