diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-08-31 12:24:21 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-08-31 15:50:35 +0200 |
commit | 83ec969cc7170634872d4ff3ffc0d4099a6765a4 (patch) | |
tree | 6332c89037e525896b9f2e06bedc37d98c584a28 /guix | |
parent | b03267df6d5ec44e9617b6aab0df14a2e79f822e (diff) |
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'.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/packages.scm | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ 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) |