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:
parent
b03267df6d
commit
83ec969cc7
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user