challenge: Fix type mismatch when comparing to a local hash.

* guix/scripts/challenge.scm (call-with-mismatches)[narinfo1]: When
LOCAL-HASH is true, call 'narinfo-hash->sha256' and use 'bytevector=?'
instead of 'string=?'.
This commit is contained in:
Ludovic Courtès 2019-12-14 14:59:32 +01:00
parent 9d97a11f04
commit 428561aa63
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 2 deletions

View File

@ -321,8 +321,9 @@ specified in COMPARISON-REPORT."
(define narinfo1
(if local-hash
(find (lambda (narinfo)
(not (string=? (narinfo-hash narinfo)
local-hash)))
(not (bytevector=? (narinfo-hash->sha256
(narinfo-hash narinfo))
local-hash)))
narinfos)
(first (comparison-report-narinfos comparison-report))))