mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
deploy: Let key-and-args exceptions through.
Fixes <https://bugs.gnu.org/44825>. Reported by Christopher Lemmer Webber <cwebber@dustycloud.org>. * guix/ui.scm (guard*): Export. * guix/scripts/deploy.scm (deploy-machine*): Use 'guard*' instead of 'guard'. Add '&exception-with-kind-and-args' case.
This commit is contained in:
parent
3c881facce
commit
5842239a66
2 changed files with 23 additions and 11 deletions
|
@ -120,7 +120,18 @@ (define (deploy-machine* store machine)
|
|||
(info (G_ "deploying to ~a...~%")
|
||||
(machine-display-name machine))
|
||||
|
||||
(guard (c ((message-condition? c)
|
||||
(guard* (c
|
||||
;; On Guile 3.0, exceptions such as 'unbound-variable' are compound
|
||||
;; and include a '&message'. However, that message only contains
|
||||
;; the format string. Thus, special-case it here to avoid
|
||||
;; displaying a bare format string.
|
||||
((cond-expand
|
||||
(guile-3
|
||||
((exception-predicate &exception-with-kind-and-args) c))
|
||||
(else #f))
|
||||
(raise c))
|
||||
|
||||
((message-condition? c)
|
||||
(report-error (G_ "failed to deploy ~a: ~a~%")
|
||||
(machine-display-name machine)
|
||||
(condition-message c)))
|
||||
|
|
|
@ -101,6 +101,7 @@ (define-module (guix ui)
|
|||
show-what-to-build
|
||||
show-what-to-build*
|
||||
show-manifest-transaction
|
||||
guard*
|
||||
call-with-error-handling
|
||||
with-error-handling
|
||||
with-unbound-variable-handling
|
||||
|
|
Loading…
Reference in a new issue