aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-04-08 23:58:24 +0200
committerLudovic Courtès <ludo@gnu.org>2022-04-08 23:59:48 +0200
commitb38e053513323fef52e57496ef2d7ed3f92d772e (patch)
treeb90feebf0a4339f9be1ef2f32bbaab655d22614d /doc
parent0d0e2165ea80262b1044e6cebcc7ad820e59f872 (diff)
downloadguix-b38e053513323fef52e57496ef2d7ed3f92d772e.tar
guix-b38e053513323fef52e57496ef2d7ed3f92d772e.tar.gz
doc: Build an empty index if the manual is missing.
That way, the "sk" index for 'guix-manual' is empty, because 'guix-manual' lacks an "sk" translation. * doc/build.scm (html-manual-identifier-index)[build](html-files): Gracefully handle 'scandir' returning #f.
Diffstat (limited to 'doc')
-rw-r--r--doc/build.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/build.scm b/doc/build.scm
index f5c8713b41..cf3e5d2830 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -309,8 +309,9 @@ actual file name."
(define (html-files directory)
;; Return the list of HTML files under DIRECTORY.
(map (cut string-append directory "/" <>)
- (scandir #$manual (lambda (file)
- (string-suffix? ".html" file)))))
+ (or (scandir #$manual (lambda (file)
+ (string-suffix? ".html" file)))
+ '())))
(define anchors
(sort (concatenate