aboutsummaryrefslogtreecommitdiff
path: root/Command/LockContent.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/LockContent.hs')
-rw-r--r--Command/LockContent.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Command/LockContent.hs b/Command/LockContent.hs
index de697c090..202ba20d1 100644
--- a/Command/LockContent.hs
+++ b/Command/LockContent.hs
@@ -10,6 +10,7 @@ module Command.LockContent where
import Command
import Annex.Content
import Remote.Helper.Ssh (contentLockedMarker)
+import Utility.SimpleProtocol
cmd :: Command
cmd = noCommit $
@@ -32,13 +33,13 @@ start [ks] = do
then exitSuccess
else exitFailure
where
- k = fromMaybe (error "bad key") (file2key ks)
+ k = fromMaybe (giveup "bad key") (file2key ks)
locksuccess = ifM (inAnnex k)
( liftIO $ do
putStrLn contentLockedMarker
hFlush stdout
- _ <- getLine
+ _ <- getProtocolLine stdin
return True
, return False
)
-start _ = error "Specify exactly 1 key."
+start _ = giveup "Specify exactly 1 key."