summaryrefslogtreecommitdiff
path: root/guix/scripts/import
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/import')
-rw-r--r--guix/scripts/import/stackage.scm19
1 files changed, 10 insertions, 9 deletions
diff --git a/guix/scripts/import/stackage.scm b/guix/scripts/import/stackage.scm
index cf47bff259..f91b496d24 100644
--- a/guix/scripts/import/stackage.scm
+++ b/guix/scripts/import/stackage.scm
@@ -98,15 +98,16 @@ Import and convert the LTS Stackage package for PACKAGE-NAME.\n"))
(reverse opts))))
(match args
((package-name)
- (let ((sexp (stackage->guix-package
- package-name
- #:include-test-dependencies?
- (assoc-ref opts 'include-test-dependencies?)
- #:lts-version (assoc-ref opts 'lts-version))))
- (unless sexp
- (leave (_ "failed to download cabal file for package '~a'~%")
- package-name))
- sexp))
+ (with-error-handling
+ (let ((sexp (stackage->guix-package
+ package-name
+ #:include-test-dependencies?
+ (assoc-ref opts 'include-test-dependencies?)
+ #:lts-version (assoc-ref opts 'lts-version))))
+ (unless sexp
+ (leave (_ "failed to download cabal file for package '~a'~%")
+ package-name))
+ sexp)))
(()
(leave (_ "too few arguments~%")))
((many ...)