import: cpan: Gracefully handle missing projects.
* guix/import/cpan.scm (cpan-fetch): Check whether 'json-fetch' returns #f.
This commit is contained in:
parent
2d0409a4a2
commit
c00ae79cca
@ -181,9 +181,9 @@ return \"Test-Simple\""
|
|||||||
or #f on failure. MODULE should be the distribution name, such as
|
or #f on failure. MODULE should be the distribution name, such as
|
||||||
\"Test-Script\" for the \"Test::Script\" module."
|
\"Test-Script\" for the \"Test::Script\" module."
|
||||||
;; This API always returns the latest release of the module.
|
;; This API always returns the latest release of the module.
|
||||||
(json->cpan-release
|
(and=> (json-fetch (string-append (%metacpan-base-url) "/release/"
|
||||||
(json-fetch (string-append (%metacpan-base-url) "/release/"
|
name))
|
||||||
name))))
|
json->cpan-release))
|
||||||
|
|
||||||
(define (cpan-home name)
|
(define (cpan-home name)
|
||||||
(string-append "https://metacpan.org/release/" name))
|
(string-append "https://metacpan.org/release/" name))
|
||||||
|
Loading…
Reference in New Issue
Block a user