diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-09-22 15:03:28 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-09-22 15:03:28 -0400 |
commit | 5487ed305120ee9c511878b90e9770ac30e20324 (patch) | |
tree | 0d9d937c2dfac7ba3ffaa1660e8c0c064ca5ef27 /Gpg.hs | |
parent | 42b995ed82e26bc18d2a2874ceb65781bceab421 (diff) | |
download | keysafe-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.hs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |