scripts: challenge: Fix regression.
authorMathieu Othacehe <othacehe@gnu.org>
Thu, 20 May 2021 09:44:35 +0000 (11:44 +0200)
committerMathieu Othacehe <othacehe@gnu.org>
Thu, 20 May 2021 09:44:35 +0000 (11:44 +0200)
This is a follow-up of 3cde5231aa78aa5e31b27888cd78ee0b250a7a1c that fixes the
challenge test.

When dealing with uncompressed NAR, the file size is false. Propagate it to
progress-reporter/file as it used to be the case.

* guix/scripts/challenge.scm (call-with-nar): Accept false size.

guix/scripts/challenge.scm

index 07477f8..69c2781 100644 (file)
@@ -257,7 +257,8 @@ NARINFO."
                  (http-fetch uri)))
     (define reporter
       (progress-reporter/file (narinfo-path narinfo)
-                              (max size (or actual-size 0)) ;defensive
+                              (and size
+                                   (max size (or actual-size 0))) ;defensive
                               #:abbreviation (const (uri-host uri))))
 
     (define result