summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-03-17 23:47:18 +0100
committerLudovic Courtès <ludo@gnu.org>2014-03-17 23:47:18 +0100
commitd0a850698a947ac5c59c99980391a12abad82385 (patch)
tree3f59789895d9caeabdc74a2e7e1bdc146d4e292e /guix
parentaa2480e50d713b90805336ab48477ba596aef531 (diff)
guix archive: Improve '--generate-key' error reporting.
* guix/scripts/archive.scm (%options) <generate-key>: Report the error source and string when 'string->canonical-sexp' fails.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/archive.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm
index 0ab7686585..f513f33dd4 100644
--- a/guix/scripts/archive.scm
+++ b/guix/scripts/archive.scm
@@ -114,9 +114,10 @@ Export/import one or more packages from/to the store.\n"))
(string->canonical-sexp
(or arg "(genkey (rsa (nbits 4:4096)))"))))
(alist-cons 'generate-key params result)))
- (lambda args
- (leave (_ "invalid key generation parameters: ~s~%")
- arg)))))
+ (lambda (key err)
+ (leave (_ "invalid key generation parameters: ~a: ~a~%")
+ (error-source err)
+ (error-string err))))))
(option '("authorize") #f #f
(lambda (opt name arg result)
(alist-cons 'authorize #t result)))