From 982a94e97eff85b053558fac7c0442726a091f11 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Sun, 8 Sep 2019 14:29:27 +0200
Subject: [PATCH] import: github: Fix incorrect no-release case.

This is a followup to 81c3dc32244a17241d74eea9fa265edfcb326f6d.

Since that commit, when /releases returned an empty JSON array, we would
not fall back to /tags because of the incorrect match.

* guix/import/github.scm (fetch-releases-or-tags): Match the empty
vector instead of the empty list.
---
 guix/import/github.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/import/github.scm b/guix/import/github.scm
index 55e1f72a422..55ea00a1116 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -161,7 +161,7 @@ (define (decorate url)
         url))
 
   (match (json-fetch (decorate release-url) #:headers headers)
-    (()
+    (#()
      ;; We got the empty list, presumably because the user didn't use GitHub's
      ;; "release" mechanism, but hopefully they did use Git tags.
      (json-fetch (decorate tag-url) #:headers headers))
-- 
GitLab