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
1 changed files with 1 additions and 2 deletions

View File

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