diff options
Diffstat (limited to 'guix/scripts/import.scm')
-rw-r--r-- | guix/scripts/import.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index cf8fc073b2..e54744feca 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -107,6 +107,10 @@ Run IMPORTER with ARGS.\n")) (show-version-and-exit "guix import")) ((importer args ...) (if (member importer importers) - (let ((expr (apply (resolve-importer importer) args))) - (pretty-print expr (newline-rewriting-port (current-output-port)))) + (match (apply (resolve-importer importer) args) + ((and expr ('package _ ...)) + (pretty-print expr (newline-rewriting-port + (current-output-port)))) + (x + (leave (_ "'~a' import failed~%") importer))) (leave (_ "~a: invalid importer~%") importer))))) |