mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 13:28:12 -05:00
ssh: 'retrieve-files' detects remote export failures.
* guix/ssh.scm (retrieve-files): Call 'lookahead-u8' and raise a '&message' condition when it returns EOF.
This commit is contained in:
parent
23973e4fbf
commit
13164a2102
1 changed files with 13 additions and 0 deletions
13
guix/ssh.scm
13
guix/ssh.scm
|
@ -25,7 +25,10 @@ (define-module (guix ssh)
|
|||
#:use-module (ssh dist)
|
||||
#:use-module (ssh dist node)
|
||||
#:use-module (srfi srfi-11)
|
||||
#:use-module (srfi srfi-34)
|
||||
#:use-module (srfi srfi-35)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (ice-9 binary-ports)
|
||||
#:export (connect-to-remote-daemon
|
||||
send-files
|
||||
retrieve-files
|
||||
|
@ -205,6 +208,16 @@ (define* (retrieve-files local files remote
|
|||
(format #t (N_ "retrieving ~a store item from '~a'...~%"
|
||||
"retrieving ~a store items from '~a'...~%" count)
|
||||
count (remote-store-host remote))
|
||||
(when (eof-object? (lookahead-u8 port))
|
||||
;; The failure could be because one of the requested store items is not
|
||||
;; valid on REMOTE, or because Guile or Guix is improperly installed.
|
||||
;; TODO: Improve error reporting.
|
||||
(raise (condition
|
||||
(&message
|
||||
(message
|
||||
(format #f
|
||||
(_ "failed to retrieve store items from '~a'")
|
||||
(remote-store-host remote)))))))
|
||||
|
||||
(let ((result (import-paths local port)))
|
||||
(close-port port)
|
||||
|
|
Loading…
Reference in a new issue