diff options
Diffstat (limited to 'Command/CalcKey.hs')
-rw-r--r-- | Command/CalcKey.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Command/CalcKey.hs b/Command/CalcKey.hs index e018079cb..57e6f40c9 100644 --- a/Command/CalcKey.hs +++ b/Command/CalcKey.hs @@ -19,10 +19,8 @@ cmd = noCommit $ noMessages $ dontCheck repoExists $ (batchable run (pure ())) run :: () -> String -> Annex Bool -run _ file = do - mkb <- genKey (KeySource file file Nothing) Nothing - case mkb of - Just (k, _) -> do - liftIO $ putStrLn $ key2file k - return True - Nothing -> return False +run _ file = genKey (KeySource file file Nothing) Nothing >>= \case + Just (k, _) -> do + liftIO $ putStrLn $ key2file k + return True + Nothing -> return False |