raco pkg catalog-show: improve error for bad catalog
This commit is contained in:
parent
e4bf7ef55b
commit
a718aeb441
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user