mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-13 16:40:40 +02:00
packages: <content-hash> printer gracefully handle #f values.
Suggested by Robin Green <greenrd@greenrd.org>. * guix/packages.scm (print-content-hash): Gracefully deal with cases with 'content-hash-value' returns #f, as is the case for 'linux-libre'.
This commit is contained in:
@@ -228,7 +228,8 @@ as base32. Otherwise, it must be a bytevector."
|
||||
(define (print-content-hash hash port)
|
||||
(format port "#<content-hash ~a:~a>"
|
||||
(content-hash-algorithm hash)
|
||||
(bytevector->nix-base32-string (content-hash-value hash))))
|
||||
(and=> (content-hash-value hash)
|
||||
bytevector->nix-base32-string)))
|
||||
|
||||
(set-record-type-printer! <content-hash> print-content-hash)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user