summaryrefslogtreecommitdiff
path: root/shroud
diff options
context:
space:
mode:
Diffstat (limited to 'shroud')
-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