summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-08-17 21:52:53 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-08-17 21:52:53 -0400
commit9b3a17e3817fb47b1414aa0480948cbbcc03ca16 (patch)
tree8be0728ef7449c91cf5fb3c0da5545f9cc7c409a
parente5735a08567e370b60cc1570f04f9a76019541f5 (diff)
ui: show: Fix error messages.
* shroud/ui/show.scm (shroud-show): Display an error if requested secret doesn't exist. Remove capitalization on "no secret ID given" message.
-rw-r--r--shroud/ui/show.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/shroud/ui/show.scm b/shroud/ui/show.scm
index 84f0982..fd076eb 100644
--- a/shroud/ui/show.scm
+++ b/shroud/ui/show.scm
@@ -57,10 +57,13 @@ Show secret named ID.~%")
(define (shroud-show config db . args)
(let* ((opts (process-args args))
(id (leave-if-false (assq-ref opts 'id)
- "No secret ID given"))
+ "no secret ID given"))
(keys (alist-pick opts 'key))
(secret (vhash-ref (secrets-by-id (force db)) id)))
+ (unless secret
+ (leave "secret '~a' does not exist" id))
+
(match keys
(()
(for-each (match-lambda