From 83ec969cc7170634872d4ff3ffc0d4099a6765a4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 31 Aug 2020 12:24:21 +0200 Subject: packages: printer gracefully handle #f values. Suggested by Robin Green . * guix/packages.scm (print-content-hash): Gracefully deal with cases with 'content-hash-value' returns #f, as is the case for 'linux-libre'. --- guix/packages.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/packages.scm b/guix/packages.scm index 95d7c2cc0d..6598bd3149 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -228,7 +228,8 @@ (define-syntax content-hash (define (print-content-hash hash port) (format port "#" (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! print-content-hash) -- cgit v1.2.3