import: Exit with non-zero when an unknown importer is asked.

* guix/scripts/import.scm (guix-import): Use 'leave' instead of 'format'
when IMPORTER is unknown.
This commit is contained in:
Ludovic Courtès 2016-05-17 13:36:44 +02:00
parent f99f3f24ef
commit 787afdd0f1
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -109,5 +109,4 @@ (define (guix-import . args)
(if (member importer importers)
(let ((expr (apply (resolve-importer importer) args)))
(pretty-print expr (newline-rewriting-port (current-output-port))))
(format (current-error-port)
(_ "guix import: invalid importer~%"))))))
(leave (_ "~a: invalid importer~%") importer)))))