summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-03-12 11:18:40 +0100
committerLudovic Courtès <ludo@gnu.org>2020-03-12 11:52:38 +0100
commitc00ae79cca7f4b1c95669c5857c0e55e1b253f4f (patch)
treef6fa3b2dab3a487c4106c944339a36915ef21f64 /guix
parent2d0409a4a2cedb76ab7a96173e19304bb54b8701 (diff)
downloadpatches-c00ae79cca7f4b1c95669c5857c0e55e1b253f4f.tar
patches-c00ae79cca7f4b1c95669c5857c0e55e1b253f4f.tar.gz
import: cpan: Gracefully handle missing projects.
* guix/import/cpan.scm (cpan-fetch): Check whether 'json-fetch' returns #f.
Diffstat (limited to 'guix')
-rw-r--r--guix/import/cpan.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/import/cpan.scm b/guix/import/cpan.scm
index 7a97c7f8e8..6bcd2ce9eb 100644
--- a/guix/import/cpan.scm
+++ b/guix/import/cpan.scm
@@ -181,9 +181,9 @@ return \"Test-Simple\""
or #f on failure. MODULE should be the distribution name, such as
\"Test-Script\" for the \"Test::Script\" module."
;; This API always returns the latest release of the module.
- (json->cpan-release
- (json-fetch (string-append (%metacpan-base-url) "/release/"
- name))))
+ (and=> (json-fetch (string-append (%metacpan-base-url) "/release/"
+ name))
+ json->cpan-release))
(define (cpan-home name)
(string-append "https://metacpan.org/release/" name))