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