summaryrefslogtreecommitdiff
path: root/guix/ssh.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2019-08-29 17:19:18 -0400
committerMark H Weaver <mhw@netris.org>2019-08-29 17:19:18 -0400
commit0481289cbccba2646bf654f0ae49ac9c45602d5d (patch)
treecbe1351e2751e9d22c4c8add02991a3e6674f26a /guix/ssh.scm
parentc55fae452032aa4b1b63406983e9abdf70adc957 (diff)
parent9fbf4d2a52d4d3e01059f3432bb3f78182b5a822 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/ssh.scm')
-rw-r--r--guix/ssh.scm14
1 files changed, 7 insertions, 7 deletions
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 7bc499a2fe..b6b55bdfcb 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -106,14 +106,14 @@ given, use that to invoke the remote Guile REPL."
(let* ((repl-command (append (or become-command '())
'("guix" "repl" "-t" "machine")))
(pipe (apply open-remote-pipe* session OPEN_BOTH repl-command)))
- ;; XXX: 'channel-get-exit-status' would be better here, but hangs if the
- ;; process does succeed. This doesn't reflect the documentation, so it's
- ;; possible that it's a bug in guile-ssh.
(when (eof-object? (peek-char pipe))
- (raise (condition
- (&message
- (message (format #f (G_ "failed to run '~{~a~^ ~}'")
- repl-command))))))
+ (let ((status (channel-get-exit-status pipe)))
+ (close-port pipe)
+ (raise (condition
+ (&message
+ (message (format #f (G_ "remote command '~{~a~^ ~}' failed \
+with status ~a")
+ repl-command status)))))))
(port->inferior pipe)))
(define* (inferior-remote-eval exp session #:optional become-command)