deploy: Gracefully handle errors.

* guix/scripts/deploy.scm (guix-deploy): Wrap body in 'with-error-handling'.
This commit is contained in:
Ludovic Courtès 2020-07-30 11:17:51 +02:00
parent cfd8daaf07
commit c9c8c6331e
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 15 additions and 14 deletions

View File

@ -140,6 +140,7 @@ Perform the deployment specified by FILE.\n"))
(define (handle-argument arg result)
(alist-cons 'file arg result))
(with-error-handling
(let* ((opts (parse-command-line args %options (list %default-options)
#:argument-handler handle-argument))
(file (assq-ref opts 'file))
@ -154,4 +155,4 @@ Perform the deployment specified by FILE.\n"))
(parameterize ((%graft? (assq-ref opts 'graft?)))
(map/accumulate-builds store
(cut deploy-machine* store <>)
machines)))))))
machines))))))))