diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-04-08 23:58:24 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-04-08 23:59:48 +0200 |
| commit | b38e053513323fef52e57496ef2d7ed3f92d772e (patch) | |
| tree | b90feebf0a4339f9be1ef2f32bbaab655d22614d | |
| parent | 0d0e2165ea80262b1044e6cebcc7ad820e59f872 (diff) | |
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.
| -rw-r--r-- | doc/build.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/build.scm b/doc/build.scm index f5c8713b412..cf3e5d28305 100644 --- a/doc/build.scm +++ b/doc/build.scm | |||
| @@ -309,8 +309,9 @@ actual file name." | |||
| 309 | (define (html-files directory) | 309 | (define (html-files directory) |
| 310 | ;; Return the list of HTML files under DIRECTORY. | 310 | ;; Return the list of HTML files under DIRECTORY. |
| 311 | (map (cut string-append directory "/" <>) | 311 | (map (cut string-append directory "/" <>) |
| 312 | (scandir #$manual (lambda (file) | 312 | (or (scandir #$manual (lambda (file) |
| 313 | (string-suffix? ".html" file))))) | 313 | (string-suffix? ".html" file))) |
| 314 | '()))) | ||
| 314 | 315 | ||
| 315 | (define anchors | 316 | (define anchors |
| 316 | (sort (concatenate | 317 | (sort (concatenate |
