Improve detecting if the (guix lint) module is available

Previously it would cause an error when it's not available, which is a bit
unnecessary.
This commit is contained in:
Christopher Baines 2020-04-20 08:18:19 +01:00
parent fdee09d1c0
commit c4969eb33f

View file

@ -447,16 +447,11 @@ WHERE job_id = $1"
%package-table))))) %package-table)))))
(and (and
(catch (or (inferior-eval '(resolve-module '(guix lint) #:ensure #f) inf)
'misc-error (begin
(lambda () (simple-format (current-error-port)
(inferior-eval '(use-modules (guix lint)) inf) "warning: no (guix lint) module found\n")
#t) #f))
(lambda (key . args)
(simple-format (current-error-port)
"warning: failed to load the (guix lint) module: ~A ~A\n"
key args)
#f))
(let ((checkers (let ((checkers
(inferior-eval (inferior-eval
'(begin '(begin