summaryrefslogtreecommitdiffhomepage
path: root/keysafe.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-09-14 14:29:58 -0400
committerJoey Hess <joeyh@joeyh.name>2016-09-14 14:30:48 -0400
commitf8231ade9124faa3e7b517d2a7e76085ac84b562 (patch)
tree6745e0fc8fe2fc8866ab4837b8d2bc3c88f09c3f /keysafe.hs
parent0a3eb9be07a7514f5544384bc914f22ea88c24a8 (diff)
downloadkeysafe-f8231ade9124faa3e7b517d2a7e76085ac84b562.tar.gz
Warn when --uploadqueued fails to upload to servers.
Diffstat (limited to 'keysafe.hs')
-rw-r--r--keysafe.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/keysafe.hs b/keysafe.hs
index 33ea1a2..04f2d9b 100644
--- a/keysafe.hs
+++ b/keysafe.hs
@@ -62,8 +62,11 @@ dispatch cmdline ui storagelocations tunables possibletunables = do
=<< Gpg.getKeyToBackup ui
go CmdLine.Restore Nothing =
restore cmdline storagelocations ui possibletunables Gpg.anyKey
- go CmdLine.UploadQueued _ =
- uploadQueued (CmdLine.localstoragedirectory cmdline)
+ go CmdLine.UploadQueued _ = do
+ problems <- uploadQueued (CmdLine.localstoragedirectory cmdline)
+ if null problems
+ then return ()
+ else showError ui ("Problem uploading queued data to servers:\n\n" ++ unlines problems ++ "\n\nYour secret keys have not yet been backed up.")
go (CmdLine.Server) _ =
runServer
(CmdLine.localstoragedirectory cmdline)