Deal with bad metadata more gracefully
Without this patch, you can't uninstall or do anything if a single package has broken metadata, because everything crashes.
This commit is contained in:
parent
7235382107
commit
ce7b9f7b6f
|
@ -122,7 +122,9 @@
|
|||
|
||||
(define (get-metadata metadata-ns pkg-dir key get-default
|
||||
#:checker [checker void])
|
||||
(define get-info (get-info/full pkg-dir #:namespace metadata-ns))
|
||||
(define get-info
|
||||
(with-handlers ([exn:fail? (λ (x) #f)])
|
||||
(get-info/full pkg-dir #:namespace metadata-ns)))
|
||||
(define v
|
||||
(if get-info
|
||||
(get-info key get-default)
|
||||
|
|
Loading…
Reference in New Issue
Block a user