1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-27 11:32:21 +02:00

discovery: 'scheme-files' returns '() for a non-accessible directory.

Fixes a regression introduced in
d27cc3bfaa.

Reported by Ricardo Wurmus <rekado@elephly.net>.

* guix/discovery.scm (scheme-files): Catch 'scandir*' system errors.
Return '() and optionally raise a warning upon 'system-error'.
* tests/discovery.scm ("scheme-modules, non-existent directory"): New
test.
This commit is contained in:
Ludovic Courtès
2017-06-18 00:02:56 +02:00
parent 3bacc655c5
commit d46c4423f4
2 changed files with 15 additions and 2 deletions
+4
View File
@@ -32,6 +32,10 @@
((('guix 'import _ ...) ..1)
#t)))
(test-equal "scheme-modules, non-existent directory"
'()
(scheme-modules "/does/not/exist"))
(test-assert "all-modules"
(match (map module-name
(all-modules `((,%top-srcdir . "guix/build-system"))))