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