~ruther/guix-local

92ee0fd5eb7b1572cd4f90a7c12c1137ce74004b — Ludovic Courtès 3 years ago 872b248
import: Gracefully handle EPIPE.

Previously, "guix import pypi f3 | head -3" would print a backtrace.

* guix/scripts/import.scm (guix-import): Wrap
'pretty-print-with-comments' call in 'leave-on-EPIPE'.
1 files changed, 2 insertions(+), 1 deletions(-)

M guix/scripts/import.scm
M guix/scripts/import.scm => guix/scripts/import.scm +2 -1
@@ 85,7 85,8 @@ Run IMPORTER with ARGS.\n"))
    ((importer args ...)
     (if (member importer importers)
         (let ((print (lambda (expr)
                        (pretty-print-with-comments (current-output-port) expr))))
                        (leave-on-EPIPE
                         (pretty-print-with-comments (current-output-port) expr)))))
           (match (apply (resolve-importer importer) args)
             ((and expr (or ('package _ ...)
                            ('let _ ...)