guix build: Gracefully handle invalid '--with-git-url' specs.

* guix/scripts/build.scm (transform-package-source-git-url): Add case
for when 'string-split' does not return exactly two elements.
This commit is contained in:
Ludovic Courtès 2019-05-14 12:08:03 +02:00
parent dcc3d4030f
commit 45d41c035e
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -370,7 +370,10 @@ (define replacements
(package (package
(inherit old) (inherit old)
(source (git-checkout (url url) (source (git-checkout (url url)
(recursive? #t))))))))) (recursive? #t)))))))
(_
(leave (G_ "~a: invalid Git URL replacement specification~%")
spec))))
replacement-specs)) replacement-specs))
(define rewrite (define rewrite