mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-30 08:02:38 -05:00
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
1 changed files with 3 additions and 3 deletions
|
@ -181,9 +181,9 @@ (define (cpan-fetch name)
|
|||
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))
|
||||
|
|
Loading…
Reference in a new issue