substitute-binary: Correctly handle missing narinfos in `--query' mode.

* guix/scripts/substitute-binary.scm (guix-substitute-binary)["--query"]("have",
  "info"): Filter SUBSTITUTABLE through `narinfo?'.
This commit is contained in:
Ludovic Courtès 2013-04-12 15:52:27 +02:00
parent c7b62db614
commit f03f0c9a86
1 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ failure."
(for-each (lambda (narinfo)
(when narinfo
(format #t "~a~%" (narinfo-path narinfo))))
substitutable)
(filter narinfo? substitutable))
(newline)))
(("info" paths ..1)
;; Reply info about PATHS if it's in CACHE.
@ -216,7 +216,7 @@ failure."
(format #t "~a\n~a\n"
(or (narinfo-file-size narinfo) 0)
(or (narinfo-size narinfo) 0)))
substitutable)
(filter narinfo? substitutable))
(newline)))
(wtf
(error "unknown `--query' command" wtf)))