aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-05-14 12:08:03 +0200
committerLudovic Courtès <ludo@gnu.org>2019-05-14 12:11:05 +0200
commit45d41c035ec23d68f67b69255a5ab8f02b42a5ed (patch)
tree2e3775be2d60e8c3575e240d33e7dfc790608ae8
parentdcc3d4030fcdc83f10220a061f4b7e306a99a439 (diff)
downloadguix-45d41c035ec23d68f67b69255a5ab8f02b42a5ed.tar
guix-45d41c035ec23d68f67b69255a5ab8f02b42a5ed.tar.gz
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.
-rw-r--r--guix/scripts/build.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 8d5411ed43..8fa700c883 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -370,7 +370,10 @@ a checkout of the Git repository at the given URL."
(package
(inherit old)
(source (git-checkout (url url)
- (recursive? #t)))))))))
+ (recursive? #t)))))))
+ (_
+ (leave (G_ "~a: invalid Git URL replacement specification~%")
+ spec))))
replacement-specs))
(define rewrite