raco pkg catalog-show: improve error for bad catalog

This commit is contained in:
Matthew Flatt 2014-06-02 07:01:35 +01:00
parent e4bf7ef55b
commit a718aeb441

View File

@ -3015,6 +3015,10 @@
(values (path-element->string i) (values (path-element->string i)
(call-with-input-file* (build-path pkg-path i) (call-with-input-file* (build-path pkg-path i)
read)))])))) read)))]))))
(unless one-ht
(pkg-error (~a "could not read package catalog\n"
" catalog: ~a")
(url->string i)))
(for/fold ([ht ht]) ([(k v) (in-hash one-ht)]) (for/fold ([ht ht]) ([(k v) (in-hash one-ht)])
(if (hash-ref ht k #f) (if (hash-ref ht k #f)
ht ht