raco: skip problem "info.rkt" files
Allows some `raco` tools to work (such as `raco pkg`) when loading information about other installed tools fails, so that problems can be more easily corrected using working tools (other than `raco setup`, which is a special case, anyway, for bootstrapping). Closes PR 14221 Merge to v6.0
This commit is contained in:
parent
dbad2913ec
commit
b625e62ca8
|
@ -1,12 +1,19 @@
|
|||
#lang racket/base
|
||||
(require setup/getinfo
|
||||
racket/list)
|
||||
|
||||
(require setup/getinfo)
|
||||
(provide all-tools)
|
||||
|
||||
(define (get-info/full/skip dir)
|
||||
(with-handlers ([exn:fail? (lambda (exn)
|
||||
(log-error (exn-message exn))
|
||||
#f)])
|
||||
(get-info/full dir)))
|
||||
|
||||
(define (all-tools)
|
||||
(let* ([dirs (find-relevant-directories '(raco-commands) 'all-available)]
|
||||
[tools (make-hash)])
|
||||
(for ([i (in-list (map get-info/full dirs))]
|
||||
(for ([i (in-list (filter-map get-info/full/skip dirs))]
|
||||
[d (in-list dirs)])
|
||||
(let ([entries (let ([l (if i
|
||||
(i 'raco-commands (lambda () null))
|
||||
|
|
Loading…
Reference in New Issue
Block a user