ssh: Improve error reporting when retrieving files.
authorLudovic Courtès <ludo@gnu.org>
Sun, 7 Jan 2018 21:13:45 +0000 (22:13 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 7 Jan 2018 22:46:39 +0000 (23:46 +0100)
commit896fec476f728183b331cbb6e2afb891207b4205
tree4050777410d82679d9a0b9ab7db087294d210bca
parent4a8d536ffe4cac1822d9655e0871fdc1684d569b
ssh: Improve error reporting when retrieving files.

'guix copy --from' now reports messages much more useful than "failed to
retrieve files".

* guix/ssh.scm (store-export-channel)[export]: Wrap 'use-modules' in
'catch' and 'with-store' in 'guard'.  Check for invalid items.  Write a
status sexp on stdout.
(raise-error): New macro.
(retrieve-files): Read the initial status sexp and report errors
accordingly.
guix/ssh.scm