mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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.
This commit is contained in:
parent
aa2480e50d
commit
d0a850698a
1 changed files with 4 additions and 3 deletions
|
@ -114,9 +114,10 @@ (define %options
|
|||
(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)))
|
||||
|
|
Loading…
Reference in a new issue