summaryrefslogtreecommitdiff
path: root/guix/scripts/import/cran.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-12-12 00:06:18 +0100
committerRicardo Wurmus <rekado@elephly.net>2020-12-12 00:08:27 +0100
commit482b8ae2cd3f126a1300178e317df8993bf75b16 (patch)
treef21e58812ed70ea1126a40d8548f59f19be9702d /guix/scripts/import/cran.scm
parent7eb920351abc7757ee9711ac147e63d6936e5ee8 (diff)
import/cran: Abort with error message when recursive import fails.
Previously, after a failed recursive import "guix import" would signal success. * guix/import/cran.scm (cran->guix-package): Raise a condition when all repositories have been exhausted. * guix/scripts/import/cran.scm (guix-import-cran): Handle errors.
Diffstat (limited to 'guix/scripts/import/cran.scm')
-rw-r--r--guix/scripts/import/cran.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm
index 33944c4a3f..20e82ae2ca 100644
--- a/guix/scripts/import/cran.scm
+++ b/guix/scripts/import/cran.scm
@@ -97,10 +97,11 @@ Import and convert the CRAN package for PACKAGE-NAME.\n"))
((package-name)
(if (assoc-ref opts 'recursive)
;; Recursive import
- (map package->definition
- (filter identity
- (cran-recursive-import package-name
- #:repo (or (assoc-ref opts 'repo) 'cran))))
+ (with-error-handling
+ (map package->definition
+ (filter identity
+ (cran-recursive-import package-name
+ #:repo (or (assoc-ref opts 'repo) 'cran)))))
;; Single import
(let ((sexp (cran->guix-package package-name
#:repo (or (assoc-ref opts 'repo) 'cran))))