doc: build.scm: Handle (current-source-directory) being #f.
Changes
1 files changed · +5 −2
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| doc/build.scm | modified | +5 | −2 | View file |
doc/build.scm
View filediff --git a/doc/build.scm b/doc/build.scm
index 9088e99..2b081ae 100644
--- a/doc/build.scm
+++ b/doc/build.scm
@@ -1365,7 +1365,9 @@ by 'html-identifier-indexes'."
(let* ((root (canonicalize-path
- (string-append (current-source-directory) "/..")))
+ (string-append (or (current-source-directory)
+ (string-append (getcwd) "/doc"))
+ "/..")))
(commit date (latest-commit+date root))
(version (or (getenv "GUIX_MANUAL_VERSION")
(string-take commit 7)))
@@ -1412,7 +1414,8 @@ by 'html-identifier-indexes'."
(merge-index-alists guix-split-node-indexes guile-split-node-indexes))
(format (current-error-port)
- "building manual from work tree around commit ~a, ~a~%"
+ "building manual from work tree (~a) around commit ~a, ~a~%"
+ root
commit
(let* ((time (make-time time-utc 0 date))
(date (time-utc->date time)))