style: Gracefully handle errors such as EACCES when opening files.
* guix/scripts/style.scm (guix-style): Wrap body in 'with-error-handling'.master
parent
a9892f8f2d
commit
f6e79ef108
|
@ -543,6 +543,7 @@ Update package definitions to the latest style.\n"))
|
||||||
edit-expression/dry-run
|
edit-expression/dry-run
|
||||||
edit-expression))
|
edit-expression))
|
||||||
(policy (assoc-ref opts 'input-simplification-policy)))
|
(policy (assoc-ref opts 'input-simplification-policy)))
|
||||||
|
(with-error-handling
|
||||||
(for-each (lambda (package)
|
(for-each (lambda (package)
|
||||||
(simplify-package-inputs package #:policy policy
|
(simplify-package-inputs package #:policy policy
|
||||||
#:edit-expression edit))
|
#:edit-expression edit))
|
||||||
|
@ -553,4 +554,4 @@ Update package definitions to the latest style.\n"))
|
||||||
(sort (if (null? packages)
|
(sort (if (null? packages)
|
||||||
(fold-packages cons '() #:select? (const #t))
|
(fold-packages cons '() #:select? (const #t))
|
||||||
packages)
|
packages)
|
||||||
(negate package-location<?)))))
|
(negate package-location<?))))))
|
||||||
|
|
Reference in New Issue