diff options
author | Christopher Baines <mail@cbaines.net> | 2020-04-20 08:18:19 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-04-20 08:18:19 +0100 |
commit | c4969eb33ffc103cca9bf463125b36b3cba3661e (patch) | |
tree | 17dec80943f873a79b9961dfef4d7529a9e8cb15 /guix-data-service | |
parent | fdee09d1c0c475451eb865276dbc694c3a1beba4 (diff) | |
download | data-service-c4969eb33ffc103cca9bf463125b36b3cba3661e.tar data-service-c4969eb33ffc103cca9bf463125b36b3cba3661e.tar.gz |
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.
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/jobs/load-new-guix-revision.scm | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm index f716950..198c0b2 100644 --- a/guix-data-service/jobs/load-new-guix-revision.scm +++ b/guix-data-service/jobs/load-new-guix-revision.scm @@ -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 |