offload: 'test' gracefully handles 'node-repl-error'.
Fixes <https://bugs.gnu.org/28057>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/offload.scm (assert-node-has-guix): Catch 'node-repl-error' and call 'leave'.
This commit is contained in:
parent
0e3c8528af
commit
5a5e34e358
|
@ -551,18 +551,23 @@ slot (which must later be released with 'release-build-slot'), or #f and #f."
|
||||||
|
|
||||||
(define (assert-node-has-guix node name)
|
(define (assert-node-has-guix node name)
|
||||||
"Bail out if NODE lacks the (guix) module, or if its daemon is not running."
|
"Bail out if NODE lacks the (guix) module, or if its daemon is not running."
|
||||||
(match (node-eval node
|
(catch 'node-repl-error
|
||||||
'(begin
|
(lambda ()
|
||||||
(use-modules (guix))
|
(match (node-eval node
|
||||||
(with-store store
|
'(begin
|
||||||
(add-text-to-store store "test"
|
(use-modules (guix))
|
||||||
"Hello, build machine!"))))
|
(with-store store
|
||||||
((? string? str)
|
(add-text-to-store store "test"
|
||||||
(info (G_ "Guix is usable on '~a' (test returned ~s)~%")
|
"Hello, build machine!"))))
|
||||||
name str))
|
((? string? str)
|
||||||
(x
|
(info (G_ "Guix is usable on '~a' (test returned ~s)~%")
|
||||||
(leave (G_ "failed to use Guix module on '~a' (test returned ~s)~%")
|
name str))
|
||||||
name x))))
|
(x
|
||||||
|
(leave (G_ "failed to use Guix module on '~a' (test returned ~s)~%")
|
||||||
|
name x))))
|
||||||
|
(lambda (key . args)
|
||||||
|
(leave (G_ "remove evaluation on '~a' failed:~{ ~s~}~%")
|
||||||
|
args))))
|
||||||
|
|
||||||
(define %random-state
|
(define %random-state
|
||||||
(delay
|
(delay
|
||||||
|
|
Loading…
Reference in New Issue