summaryrefslogtreecommitdiffhomepage
path: root/Gpg.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-09-22 15:03:28 -0400
committerJoey Hess <joeyh@joeyh.name>2016-09-22 15:03:28 -0400
commit5487ed305120ee9c511878b90e9770ac30e20324 (patch)
tree0d9d937c2dfac7ba3ffaa1660e8c0c064ca5ef27 /Gpg.hs
parent42b995ed82e26bc18d2a2874ceb65781bceab421 (diff)
downloadkeysafe-5487ed305120ee9c511878b90e9770ac30e20324.tar.gz
In --autostart mode, check for gpg keys that have not been backed up, and offer to back them up.
Only ask once per key. This commit was sponsored by Thomas Hochstein on Patreon.
Diffstat (limited to 'Gpg.hs')
-rw-r--r--Gpg.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Gpg.hs b/Gpg.hs
index c752059..8290c2f 100644
--- a/Gpg.hs
+++ b/Gpg.hs
@@ -22,13 +22,13 @@ import qualified Data.Text as T
-- If there is only one gpg secret key,
-- the choice is obvious. Otherwise prompt the user with a list.
getKeyToBackup :: UI -> IO SecretKey
-getKeyToBackup ui = go =<< Gpg.listSecretKeys
+getKeyToBackup ui = go =<< listSecretKeys
where
go [] = do
showError ui "You have no gpg secret keys to back up."
error "Aborting on no gpg secret keys."
- go [(_, kid)] = Gpg.getSecretKey kid
- go l = maybe (error "Canceled") Gpg.getSecretKey
+ go [(_, kid)] = getSecretKey kid
+ go l = maybe (error "Canceled") getSecretKey
=<< promptKeyId ui "Pick gpg secret key"
"Pick gpg secret key to back up:" l