mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-29 07:42:23 -05:00
lint: Use 'with-error-handling'.
This improves the error message when unable to access ~/.cache as reported by Jonathan Brielmaier <jonathan.brielmaier@web.de> in <https://bugs.gnu.org/42859>. * guix/scripts/lint.scm (guix-lint): Wrap body in 'with-error-handling'.
This commit is contained in:
parent
e45d7f3198
commit
4c5edee1ef
1 changed files with 20 additions and 19 deletions
|
@ -1,7 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
|
;;; Copyright © 2014 Cyril Roelandt <tipecaml@gmail.com>
|
||||||
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
|
;;; Copyright © 2014, 2015 Eric Bavier <bavier@member.fsf.org>
|
||||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
|
;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
|
||||||
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
|
;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
|
||||||
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||||
|
@ -174,6 +174,7 @@ (define (parse-options)
|
||||||
(when (assoc-ref opts 'list?)
|
(when (assoc-ref opts 'list?)
|
||||||
(list-checkers-and-exit checkers))
|
(list-checkers-and-exit checkers))
|
||||||
|
|
||||||
|
(with-error-handling
|
||||||
(let ((any-lint-checker-requires-store?
|
(let ((any-lint-checker-requires-store?
|
||||||
(any lint-checker-requires-store? checkers)))
|
(any lint-checker-requires-store? checkers)))
|
||||||
|
|
||||||
|
@ -193,4 +194,4 @@ (define (call-maybe-with-store proc)
|
||||||
(for-each (lambda (spec)
|
(for-each (lambda (spec)
|
||||||
(run-checkers (specification->package spec) checkers
|
(run-checkers (specification->package spec) checkers
|
||||||
#:store store))
|
#:store store))
|
||||||
args))))))))
|
args)))))))))
|
||||||
|
|
Loading…
Reference in a new issue