mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-18 17:01:51 -05:00
ssh: 'connect-to-remote-daemon' raises a nicer message upon error.
* guix/ssh.scm (connect-to-remote-daemon): Catch 'store-connection-error?' and rethrow.
This commit is contained in:
parent
e3e0886c2d
commit
e2f4a5704b
1 changed files with 7 additions and 2 deletions
|
@ -302,8 +302,13 @@ (define* (connect-to-remote-daemon session
|
|||
"/var/guix/daemon-socket/socket"))
|
||||
"Connect to the remote build daemon listening on SOCKET-NAME over SESSION,
|
||||
an SSH session. Return a <store-connection> object."
|
||||
(open-connection #:port (remote-daemon-channel session socket-name)))
|
||||
|
||||
(guard (c ((store-connection-error? c)
|
||||
;; Raise a more focused error condition.
|
||||
(raise (formatted-message
|
||||
(G_ "failed to connect over SSH to daemon at '~a', socket ~a")
|
||||
(session-get session 'host)
|
||||
socket-name))))
|
||||
(open-connection #:port (remote-daemon-channel session socket-name))))
|
||||
|
||||
(define (store-import-channel session)
|
||||
"Return an output port to which archives to be exported to SESSION's store
|
||||
|
|
Loading…
Reference in a new issue