aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-01-12 22:51:41 +0100
committerLudovic Courtès <ludo@gnu.org>2018-01-12 23:41:15 +0100
commit5a5e34e3588e863de0028523ada61041e78cf8c6 (patch)
tree2d5b6b954abecbc52cb823a2caf105eb017cb1dc /guix
parent0e3c8528af1b36687a8cfe56a09c452b6ff3508d (diff)
downloadgnu-guix-5a5e34e3588e863de0028523ada61041e78cf8c6.tar
gnu-guix-5a5e34e3588e863de0028523ada61041e78cf8c6.tar.gz
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'.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/offload.scm29
1 files changed, 17 insertions, 12 deletions
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 25efe90e79..aaad992289 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -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)
"Bail out if NODE lacks the (guix) module, or if its daemon is not running."
- (match (node-eval node
- '(begin
- (use-modules (guix))
- (with-store store
- (add-text-to-store store "test"
- "Hello, build machine!"))))
- ((? string? str)
- (info (G_ "Guix is usable on '~a' (test returned ~s)~%")
- name str))
- (x
- (leave (G_ "failed to use Guix module on '~a' (test returned ~s)~%")
- name x))))
+ (catch 'node-repl-error
+ (lambda ()
+ (match (node-eval node
+ '(begin
+ (use-modules (guix))
+ (with-store store
+ (add-text-to-store store "test"
+ "Hello, build machine!"))))
+ ((? string? str)
+ (info (G_ "Guix is usable on '~a' (test returned ~s)~%")
+ name str))
+ (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
(delay