mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-26 06:18:07 -05:00
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'.
This commit is contained in:
parent
872b248745
commit
92ee0fd5eb
1 changed files with 2 additions and 1 deletions
|
@ -85,7 +85,8 @@ (define-command (guix-import . args)
|
|||
((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 _ ...)
|
||||
|
|
Loading…
Reference in a new issue