me
/
guix
Archived
1
0
Fork 0

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'.
master
Ludovic Courtès 2023-06-07 10:14:17 +02:00
parent 872b248745
commit 92ee0fd5eb
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 2 additions and 1 deletions

View File

@ -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 _ ...)