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:
parent
fdee09d1c0
commit
c4969eb33f
1 changed files with 5 additions and 10 deletions
|
|
@ -447,16 +447,11 @@ WHERE job_id = $1"
|
|||
%package-table)))))
|
||||
|
||||
(and
|
||||
(catch
|
||||
'misc-error
|
||||
(lambda ()
|
||||
(inferior-eval '(use-modules (guix lint)) inf)
|
||||
#t)
|
||||
(lambda (key . args)
|
||||
(simple-format (current-error-port)
|
||||
"warning: failed to load the (guix lint) module: ~A ~A\n"
|
||||
key args)
|
||||
#f))
|
||||
(or (inferior-eval '(resolve-module '(guix lint) #:ensure #f) inf)
|
||||
(begin
|
||||
(simple-format (current-error-port)
|
||||
"warning: no (guix lint) module found\n")
|
||||
#f))
|
||||
(let ((checkers
|
||||
(inferior-eval
|
||||
'(begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue